linux-3.9: Compile times

· klm's blog


Original post is here: eklausmeier.goip.de

Compare linux-3.8.4: Compile times. This time we compiled Linux kernel 3.9 and used

time make -j 20

according Compiler Speed-up.

My 8-core machine is fully loaded, as can be seen by top:

[more_WP_Tag]

top - 21:08:50 up 30 min, 10 users,  load average: <strong>21.92</strong>, 16.95, 8.40
Tasks: 257 total,  25 running, 232 sleeping,   0 stopped,   0 zombie
Cpu0  : 96.3%us,  3.7%sy,  0.0%ni,  0.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu1  : 93.7%us,  6.3%sy,  0.0%ni,  0.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu2  : 93.4%us,  6.6%sy,  0.0%ni,  0.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu3  : 94.0%us,  6.0%sy,  0.0%ni,  0.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu4  : 94.4%us,  4.7%sy,  0.0%ni,  0.0%id,  0.0%wa,  0.0%hi,  1.0%si,  0.0%st
Cpu5  : 81.7%us, 10.0%sy,  8.3%ni,  0.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu6  : 92.7%us,  7.3%sy,  0.0%ni,  0.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu7  : 93.4%us,  6.6%sy,  0.0%ni,  0.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:  16380376k total,  5714084k used, 10666292k free,    95536k buffers
Swap: 31250428k total,        0k used, 31250428k free,  3726372k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 6806 klm       20   0 94456  67m 7212 R   44  0.4   0:01.76 cc1
 5977 klm       20   0  159m 133m 7196 R   38  0.8   0:04.53 cc1
 6844 klm       20   0 82056  55m 7152 R   38  0.3   0:01.33 cc1
 6943 klm       20   0 71384  45m 7200 R   31  0.3   0:00.95 cc1
 7009 klm       20   0 74416  47m 7128 R   23  0.3   0:00.69 cc1
 7011 klm       20   0 72028  45m 7016 S   21  0.3   0:00.64 cc1
 7034 klm       20   0 67952  41m 6892 R   17  0.3   0:00.52 cc1
 7082 klm       20   0 73764  44m 3848 R   15  0.3   0:00.45 cc1
 7053 klm       20   0 70628  43m 6532 R   15  0.3   0:00.44 cc1
 7092 klm       20   0 70736  41m 4392 R   14  0.3   0:00.41 cc1
 2040 boinc     30  10 28.2g 100m  44m R    9  0.6   4:03.08 acemd.2868
 7125 klm       20   0 55280  26m 3536 R    8  0.2   0:00.23 cc1
 7106 klm       20   0 51720  26m 6380 R    7  0.2   0:00.21 cc1
 7144 klm       20   0 45028  16m 3520 R    4  0.1   0:00.11 cc1
 7149 klm       20   0 44900  15m 3520 R    4  0.1   0:00.11 cc1
 7167 klm       20   0 39076 8656 2164 R    3  0.1   0:00.09 cc1
 7160 klm       20   0 10172 6296  524 R    2  0.0   0:00.07 genksyms
 7178 klm       20   0 40572  11m 3496 R    2  0.1   0:00.07 cc1
 7175 klm       20   0 37448 6848 2164 R    2  0.0   0:00.05 cc1
 5981 klm       20   0 23248  10m 1320 S    1  0.1   0:00.07 as
 7169 klm       20   0  7400 3656  524 S    1  0.0   0:00.04 genksyms
 7181 klm       20   0 38484  10m 3488 R    1  0.1   0:00.04 cc1
 1304 root      20   0  141m  47m  20m S    1  0.3   1:06.16 Xorg
 7014 klm       20   0 20212 7152 1316 R    1  0.0   0:00.02 as

Machine is running GPUGRID (acmed.2868 with NICE=10), and Google Chrome (WordPress).

Time needed to compile is roughly 15 minutes, speed-up round about 6, compared to make -j 1:

. . .
  IHEX2FW firmware/whiteheat.fw
  IHEX2FW firmware/keyspan_pda/keyspan_pda.fw
  IHEX2FW firmware/keyspan_pda/xircom_pgs.fw
  IHEX    firmware/yam/1200.bin
  IHEX    firmware/yam/9600.bin

real    <strong>14m25.927s</strong>
user    <strong>94m53.496s</strong>
sys     9m40.340s

After that creating all modules is required:

INSTALL_MOD_PATH=/tmp time make -j 20 modules_install

We do not want to call make as root, so we deposit all files under /tmp. Later as user root

mv /tmp/lib/modules/3.9.0/ /lib/modules/
mv /tmp/lib/firmware/ /lib/firmware/3.9.0