Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Does compiling a downloaded linux kernel (e.g 3.2) make the OS (e.g ubuntu) faster on that specific machine?

share|improve this question
    
I doubt that you will notice a difference even if it does. –  Zoke Jan 30 '12 at 2:58
    
Something being faster is Subjective, faster than what? I'm using the Ubuntu generic kernels and my PC is fast, To improve performance get better hardware there's no way around it. –  Uri Herrera Jan 30 '12 at 3:29
add comment

4 Answers

up vote 6 down vote accepted

In general , no.

There are, however, some exceptions to "no". For example the liquorix kernel or Ubuntu kernel Flavors. These are generally performance tuning and can make a difference (the server kernel is faster for servers, and will not improve desktop performance).

With Ubuntu, if you are running the proper kernel flavor, you should be good to go.

Note: The Liquorix kernel also has some patches (in addition to performance tuning).

The other exception would be if you have some unusual hardware.

But in the vast majority of cases, performance is not a "standard" reason to compile a kernel.

See:

Ubuntu wiki compile kernel

share|improve this answer
add comment

The most accurate answer is, as bodhi.zazen said, not usually but with a few exceptions. Most of those exceptions are hardware related, but some are just configuration issues. Justification for my answer follows.

I've compiled twenty-six kernels between two machines in the last month attempting to performance tweak. What I found:

  1. Changing cpu type in .config to the native architecture and removing options that support other architectures improved file I/O throughput by more than 10% in benchmarks (enough I can "feel the improvement") and reduced delay following user input in XFCE on Xubuntu 12.04 -32bit on my 1.8GHz (K8) Mobile Sempron 512MB RAM laptop. The same changes had no quantifiable or perceivable impact on my 1.73GHz Core2 Duo 2GB RAM laptop in Ubuntu 12.04 64-bit, but did cause one formerly stable application to become crash prone.
  2. Changing HZ in .config to 1000 dramatically improved responsiveness to user input when under high CPU load in both systems. It also made window focus changes in X instantaneous in all conditions.
  3. The BFS patch increased battery life in both systems by a few minutes. Just enough to be measurable and consist, but not enough to matter much. Benchmarks revealed no statistically significant performance changes, but both systems "feel" faster. I suspect this has to do with scheduling priority being more beneficial to the typical workloads on those specific machines.
  4. All other .config combinations tried resulted in decreased performance on both systems.

I spent ridiculous sums of time compiling and testing different configurations. For all that, only five kernels produced a desireable result, out of twenty-six attempted. Seven kernels were not even operable (either unbootable or failed to start X). I recently installed the Liquorix kernel from repository and netted all the above improvements plus a roughly 50% frame rate increase in both the Windows games I play through WINE on the Core2 system. That only took a few minutes, and nothing broke.

Is my OS better because I compiled my own kernel? Well, yeah a little. Until I find something that runs slower/breaks, because I failed to find it during testing. Is my OS faster? No.

share|improve this answer
add comment

I don't know how about kernel, but in general compiling apps from source usually makes them work faster (I usually do it with dev libs like CGAL, or apps like ParaView). Of course when compiling process is optimized for the architecture and so on.

However I don't think that compiling a kernel would make it faster that much that it had a visible influence on the performance. In my opinion it would only be visible in performance counters.

share|improve this answer
add comment

I compiled a kernel for an EeePC 900A just to remove unnecessary drivers and features, to boot without extra initrd, to set the default I/O scheduler, to optimize for Atom, and to disable debugging and some performance- and responsiveness-degrading power-saving features. (it's being used as server for various little things). Less boot time needed^^ About one year ago I tried it before, but Chromium only showed blank Web pages - with clickable links...

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.