[kwlug disc.] (advanced user only) Request for kernel compile
time
Andrew Kohlsmith (lists)
aklists at mixdown.ca
Mon Apr 7 11:17:19 EDT 2008
On April 7, 2008 01:17:42 am Richard Weait wrote:
> make
> real 60m2.657s
> user 37m25.311s
> sys 5m19.111s
an hour to compile??
> 4-way Intel(R) Xeon(TM) CPU 3.00GHz stepping 04
>
> make
> real 44m23.687s
> user 40m47.005s
> sys 4m11.700s
>
> make -j5
> real 18m31.142s
> user 67m26.002s
> sys 5m18.785s
You've got to be kidding me; I have a crappy T2310 1.46GHz and I get under 5
minute compile times. A friend told me that it's not necessarily raw compute
power but memory which makes a big difference. I've got 4G on this laptop
and under his careful tutelage run make -j50. You have nothing to worry
about unless you hit swap.
I believe his exact words were "If you hit swap, you die." :-)
In fact, he says that you can run -j (with no number) and with 4G you should
be able to fit the entire build in memory. I tried that, and died. He later
revealed that that wouldn't quite work when running X. He's a sick pup. :-)
Anyway; my suggestions based on my own testing are as follows:
1) As much RAM as possible. Touching disk sucks.
2) Experiment with the number of simultaneous builds (-j ###); on my
particular machine I found between -j 40 and -j 50 to be the best.
3) If you're really looking to improve build times, look at ccache. I have
also experimented with distcc, but for the kernel, ccache seemed to be the
big help. I was achieving roughly 2 minute full build times with it.
Now I realize that you're not looking to optimize your compile times; you're
trying to see what kind of computing horsepower your system has. Raw kernel
compiles don't show you that. Take that make -j50 and try it on a lessor
machine... you'll start seeing the difference. Without spawning a lot of
processes, you're not taxing the processor as much as you can and thus not
getting a good measure of your CPU's capabilities. You need some application
that is highly parallizable; make -j does that. :-)
-A.
More information about the KWLUG-Disc
mailing list