Kernel compile times: HDD vs. SSD vs. TMPFS

Hello, I've just done a 'benchmarking' on a kernel compilation, by compiling a kernel with the same .config on either HDD, SSD or TMPFS just to see the compiling times for my personal pleasure.

Some useful info:
CPU: i7-2600K OC @ 4.4GHz
Kernel version: 3.4.5
Command used: time make -j10

NOTE: To ensure equal conditions between each compilation I've used:
sync; echo 3 > /proc/sys/vm/drop_caches 

Here are the results:

HDD
Technical data
Model: Western Digital 500GB 64MB cache (WDC WD5000AZRX)
Bandwith: ~120MB/s read/write
Seek time: ~10-12msec

Compilation time
Kernel: arch/x86/boot/bzImage is ready  (#1)
real    2m13.178s
user    14m5.407s
sys     1m13.519s

SSD
Technical data
Model: OCZ Vertex 3 120GB 
Bandwith: ~480MB/s read, ~320MB/s write
Seek time: ~1msec (0.40-0.70msec)

Compilation time
Kernel: arch/x86/boot/bzImage is ready  (#1)
real    1m58.217s
user    13m3.937s
sys     1m2.879s

TMPFS
Technical data
Model: Kingston 1333MHz DDR3
Bandwith: ~18GB/s read, ~20GB/s write (actually useless data as tmpfs will never work at that speed)
Seek time: ~50nsec (0.00005msec)

Compilation time
Kernel: arch/x86/boot/bzImage is ready  (#1)
real    1m59.639s
user    13m15.891s
sys     1m3.722s

NICE LOOKING TABLE
HDD SSD TMPFS
2m13s 1m58s 1m59s
14m5s 13m3s 13m15s
1m13s 1m2s 1m3s


This really is a little bit of a surprise, the compilation on an SSD disk performed better than the one on RAM. And generally the difference between all of them wasn't *so* big. On older CPUs this might not be the case and HDD perform a lot worse than SSD/TMPFS.


3 comments:

  1. What the hell? 2 inute *Linux Kernel* compilation time?

    ReplyDelete
  2. remember that dealing with ramdisk is not dealing with pure ram but also a lot of other stuff is involved (drivers, ...).

    ReplyDelete