Announcement

Collapse
No announcement yet.

Benchmarking The Linux 5.19 Kernel Built With "-O3 -march=native"

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • gmturner
    replied
    Originally posted by Barley9432 View Post
    And the entire benefit of Gentoo gone out the window with a single article... nice
    Even if this article showed (it doesn't) that there were no benefits to kernel and userspace compiler flag optimization across all architectures, this would not ruin "the entire benefit of Gentoo."

    Certainly global gcc flag optimization can or has been counter-productive for Gentoo users, so this is not totally crazy. However, ftr, enabling global compiler flag optimization in Gentoo wouldn't optimize the kernel. Just userspace libraries, and executables. Not even all of them, as there are a bunch of black/white-lists in various package recipes. But, whatever. Let's just pretend/assume it's always 100% pointless or counter-productive to optimize compiler flags, for now, and ignore the kernel/user-land distinction.

    Regardless, the goals and value proposition of Gentoo are far from eliminated. If you're thinking "Yeah, sure. Everybody knows nobody ever used any Gentoo features except compiler flag optimization" check out this wayback capture from before Gentoo 1.0, way back in 2001 (emphasis mine):
    Portage allows you to set up Gentoo Linux the way you like it -- with the optimization settings that you want, and with optional build-time functionality (like GNOME, KDE, mysql, ALSA, LDAP support, etc.) enabled or disabled as you desire. If you don't want GNOME on your system, your apps won't have optional GNOME support enabled, and if you do, then they will. That's why we prefer thinking of Gentoo Linux as a meta-distribution or Linux technology engine. You decide what kind of system you want, and Portage will create it for you.
    This meta-distribution concept -- especially 'use-flags,' which in Gentoo determine how system software dependencies are configured before "build-time" even starts -- was not some sort of post-ricer-meme retcon -- it seriously was the actual vision of Gentoo, more-or-less right from the beginning.

    I've already wasted too much breath. Gentoo will always be reducible to -funroll-all-loops for some folks. Admittedly this is a funny and not wholly undeserved criticism of a certain class of Gentoo user. Or at least it definitely used to be.

    But, for the record, I highly doubt compiler optimization is the main benefit of Gentoo as perceived by most people using Gentoo today in any long-term capacity, or as a serious development tool of any kind.

    Ask either of them, they'll probably back me up! XD

    Leave a comment:


  • cj.wijtmans
    replied
    As long as you show hostility instead of curiosity you will never know. There is no point in conversing.

    Leave a comment:


  • yump
    replied
    Originally posted by cj.wijtmans View Post

    You have replied 3 times to me now with nonsense. What a waste of time. And yes you made assumptions about my system otherwise you would not harass me about my system specs which you could have asked about instead of passive agresive bs
    Link the first reply please. You may find that you misread the username.

    I did not ask about your specs. I asked about your use case. I mentioned specs because you used the word "server" and the only place I know of -Os being used is not something I would call a server. So yes, I suppose I assumed that you aren't running 20 year old hardware.

    passive agresive bs
    "I have an special reason for using -Os, but I won't say what it is, tee hee hee!"
    Last edited by yump; 25 July 2022, 08:00 AM.

    Leave a comment:


  • cj.wijtmans
    replied
    Originally posted by yump View Post

    I made no assumptions about your system. I explicitly asked about your system.

    And I keep nothing. That was my only interaction with you in this thread.
    You have replied 3 times to me now with nonsense. What a waste of time. And yes you made assumptions about my system otherwise you would not harass me about my system specs which you could have asked about instead of passive agresive bs

    Leave a comment:


  • yump
    replied
    Originally posted by cj.wijtmans View Post

    And why do you keep making baseless assumptions about my system? I despise people like you with a passion.
    I made no assumptions about your system. I explicitly asked about your system.

    And I keep nothing. That was my only interaction with you in this thread.

    Leave a comment:


  • cj.wijtmans
    replied
    Originally posted by yump View Post

    Alright, what are you using it for that compiled binary size is more important than performance? It makes sense for OpenWRT because there's often a constraint like, "the board only has a 128 MB non-replaceable flash chip on it".
    And why do you keep making baseless assumptions about my system? I despise people like you with a passion.

    Leave a comment:


  • yump
    replied
    Originally posted by cj.wijtmans View Post

    What if i dont need performance. I never said what the server is used for.
    Alright, what are you using it for that compiled binary size is more important than performance? It makes sense for OpenWRT because there's often a constraint like, "the board only has a 128 MB non-replaceable flash chip on it".

    Leave a comment:


  • cj.wijtmans
    replied
    Originally posted by birdie View Post

    -Os is really really bad. You may want to reconsider your decision Michael has tested it on several occasions and the performance loss at times is jarring.

    -Os is primarily used by embedded, it shouldn't be used on CPUs with enough cache.
    What if i dont need performance. I never said what the server is used for.

    Leave a comment:


  • yump
    replied
    Originally posted by birdie View Post
    Poor Gentoo users who have always insisted on building everything with -march=native. LOL.

    Oh, and the -O3 kernel is so much faster faster than -O2, the whole percent, and that's on a CPU with lavish L2/L3 caches. Wow. So many comments earlier, so much pain.
    When you consider how much of the CPU time is spent in the kernel vs userspace, a whole percent is quite a lot.

    Leave a comment:


  • AdrianBc
    replied
    Originally posted by birdie View Post

    Any data to back it up? Benchmarks, whatever? Are you sure the setups are exactly the same? I mean you may have fined tuned your Gentoo installation (removed/stopped various services, disabled swap) yet you use Fedora/Ubuntu by default.

    I have no doubt that all the standard distributions that I have tried are slower, but I have never bothered to investigate the cause, to see how much, if any, comes from compilation options. On the programs that I write myself, the compilation options have a very large influence on performance, but those are exactly the kind of programs where this is expected, which spend much time with array operations and loops. In the kernel, it is likely that more time is spent waiting for memory accesses to be completed than actually executing instructions, so there are few places where the quality of the code generated by the compiler can make much difference.


    Of course, there are several very important contributors to the relative slowness of the standard distributions versus the Gentoo that I am using, which have nothing to do with the optimized compilation in Gentoo but are peculiar to the system configuration that I happen to use. For example, after I install Gentoo, the system boots much faster because I use a custom kernel configuration instead of the generic kernel, and it is likely that many GUI applications seem more responsive because I use XFCE instead of the Gnome or KDE used in most standard distributions.

    In my opinion the best desktop environment ever has been KDE 3.5, but the team who took over the development of KDE has destroyed it, so after it became too painful to maintain the old KDE 3.5, I have switched to XFCE, which has less features, but it is flexible enough to be customized in the way that I like and it appears to have lower overhead than the more complex Gnome/KDE.


    In any case, the main reason while I compile almost all programs that I use from source is not the hope that this might make them faster, but because I want to be able to modify them whenever I want them to behave differently and to be able to discover the cause of any mysterious bug or unexpected behavior. On Windows, I have experienced many cases when even a team of IT support people working for a couple of weeks has been unable to solve some mysterious bugs, but on Linux, due to the availability of the source, I have never seen a problem that cannot be solved in a reasonable time.
    Last edited by AdrianBc; 15 July 2022, 12:50 AM.

    Leave a comment:

Working...
X