You are on page 1of 2

04/05/14 18:36 performance - Does compiling a linux kernel make the OS faster?

- Ask Ubuntu
Page 1 sur 2 http://askubuntu.com/questions/99759/does-compiling-a-linux-kernel-make-the-os-faster


sign up log in tour help
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 linux kernel make the OS faster?
Does compiling a downloaded linux kernel (e.g 3.2) make the OS (e.g ubuntu) faster on that
specific machine?
performance compiling
asked Jan 30 '12 at 2:54 Jan 30 '12 at 2:54
rockr101
562 562 2 12 22
– 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
4 Answers
In general , no.
There are, however, some exceptions to "no". For example the or
. These are generally performance tuning and can make a difference (the server kernel is
faster for servers, and will not improve desktop performance).
liquorix kernel Ubuntu kernel
Flavors
With Ubuntu, if you are running the proper kernel flavor, you should be good to go.
The Liquorix kernel also has some patches (in addition to performance tuning). Note: Note:
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
edited Jan 30 '12 at 5:45 Jan 30 '12 at 5:45 answered Jan 30 '12 at 4:32 Jan 30 '12 at 4:32
bodhi.zazen
33k 33k 2 54 147
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.
Ubuntu Community Ask! Developer Design Discourse Hardware Shop More

04/05/14 18:36 performance - Does compiling a linux kernel make the OS faster? - Ask Ubuntu
Page 2 sur 2 http://askubuntu.com/questions/99759/does-compiling-a-linux-kernel-make-the-os-faster
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.
answered Feb 13 '13 at 16:58 Feb 13 '13 at 16:58
OCDtech
131 131 2
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.
answered Jan 30 '12 at 6:56 Jan 30 '12 at 6:56
Misery
1, 926 1, 926 11 23
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...
answered Jun 26 '13 at 6:22 Jun 26 '13 at 6:22
pucgenie
11