Re: Suggestions request for speed-up kernel compilation

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Andi Kleen
Date: Saturday, April 25, 2009 - 12:54 am

Alessio Igor Bogani <abogani@texware.it> writes:


Some tricks:

If you just want to test that the file you've been hacking
on compiles you can use make dir/path/file.o

Use the minimum config file for your machines, 
except for occasional fuller verification builds

Set the right -j make level. You have to experiment 
what is best.

Not enabling CONFIG_DEBUGINFO speeds up compilation significantly

When you use ccache make sure you have the cache directory on
the same partition and enable CCACHE_HARDLINK=1. Alternatively
what also works (but is a bit more expensive) is to put
the ccache cache on a SSD.

What works very well is to throw some money at it -- compilation
scales very well in a cluster. Get the cheapest quad core you can get
as an additional machine and use a tool like icecream
(http://en.opensuse.org/Icecream) to distribute the compilation.

You need special wrappers like 
ftp://firstfloor.org/pub/ak/smallsrc/icecache.c to combine
icecream with ccache

I also found using the "gold" linker in latest binutils
speeds up builds because especially when you already
have parallel compilations the linker is often a bottleneck.

-Andi

-- 
ak@linux.intel.com -- Speaking for myself only.
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Suggestions request for speed-up kernel compilation, Alessio Igor Bogani, (Fri Apr 24, 2:57 am)
Re: Suggestions request for speed-up kernel compilation, Sven-Haegar Koch, (Fri Apr 24, 3:37 am)
Re: Suggestions request for speed-up kernel compilation, Sam Ravnborg, (Fri Apr 24, 3:38 am)
Re: Suggestions request for speed-up kernel compilation, Richard Kennedy, (Fri Apr 24, 4:59 am)
Re: Suggestions request for speed-up kernel compilation, Andi Kleen, (Sat Apr 25, 12:54 am)