Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

It seems logical to me that on a 64-bit kernel compiling it to optimize for size might help overall. (My distro of choice uses -O2) It has the benefits of more registers and memory and perhaps less cache contention than normal optimized code. I have a kernel compiled like this and it seems excellent. However my question is how can I prove this? I like using Phoronix for "real world" sort of benchmarks so I would prefer to test cases like that. What should I pick to test? Does anyone else have any alternatives? Thank you very much in advance.

share|improve this question
    
Well if any one is curious the built in 7zip benchmark showed that -Os was slower, but I am not discouraged. It was even or higher in other ones. –  NightwishFan Jan 16 '11 at 17:48
add comment

1 Answer

If your -Os compiled kernel "seems excellent" I think you shouldn't care benchmarking it, here is why:

The problem with benchmarks will always be to choose what types of loads you test.
Even if Phoronix Test Suite is fine to highlight differences between different kernel revisions you can't use it yourself to prove your kernel performs better for your own load because you don't ask it the same operations on a day to day basis.

In case you still want to try this:
Maybe you could try benchmarking the applications you're using most of the time or those who takes a long time to complete (3D rendering/compilations/OLAP-style queries aka cubes/rainbow tables generation...) to see if you can find a gain.

I personally highly doubt you'll see any real (measurable, repeatable) speedup with -Os on a modern desktop CPU (embedded CPU can gain some performances though). The little more aggressive optimizations with -O2 (source article) might be more interesting than the smallest size of the -Os kernel.

this chart

If you need more infos/wants to talk about gcc optimizations more thoroughly you can go on the #gentoo channel on freenode IRC or on the gentoo forums, but remember: just don't mention the term "ricer" ^^

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.