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

  • I doubt that you will notice a difference even if it does.
    – Zoke
    Jan 30, 2012 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. Jan 30, 2012 at 3:29
  • Yes, a Kernel compiled with -O3 -march=native -mtune=native will usually be faster than a generic one because then the compiler can use every "shiny" features your CPU has like SSE or AVX.
    – frakod
    Sep 24, 2021 at 16:51

5 Answers 5


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.


Ubuntu wiki compile kernel


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.


In my experience yes. But the benefits mainly come from eliminating unnecessary features, and selecting a few others, such as your processor type. Also, make it a ultra low latency for desktop use. I've been compiling the kernel for years and for me the difference is always noticeable. But there are other benefits. Boot times are also improved.

However, it's very time consuming to get to select only the options you need.


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...


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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .