Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Compile *nix programs faster multi-core Macs' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Compile *nix programs faster multi-core Macs
Authored by: krreagan on May 25, '07 10:29:53AM

I've used this option for compiling my FreeBSD systems for many years. I have found through trial and error, that the optimal value (for me at least) is n=4*CPU/Core. That is, 8 jobs for a dual core system. This is because compiling is very IO intensive so while a job is waiting for the IO to complete, another can continue. You can have several jobs waiting on a disk to complete an operation.

Because IO is so slow (relatively to CPU) several jobs tend to be waiting on IO to complete at any one time.

There are a lot of variables that will make "n" different for different systems... amount of RAM & Cache(L1,L2,L3), Bus & HD speeds... If you have lots of RAM/Cache, try upping n to higher and higher values until you don't see any increase in compile speed.

TBM



[ Reply to This | # ]