Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm working on a Linux Kernel development project (specifically OpenEmbedded/Yocto Project) in which kernel and embedded software compilation is the primary task and my laptop with a dual-core Core i7-2620M @ 2.70GHz just isn't cutting it.

If I were to buy or build a new system, how should I prioritize the components and specifications? e.g. should I target a minimum of n-cores in the processor and then spend the rest of my budget on faster hard drives or RAM?

share|improve this question

closed as off-topic by sawdust, Ƭᴇcʜιᴇ007, Moses, Tog, mpy Oct 29 '13 at 19:51

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions seeking product, service, or learning material recommendations are off-topic because they tend to become obsolete quickly. Instead, describe your situation and the specific problem you're trying to solve. Here are a few suggestions on how to properly ask this type of question." – Ƭᴇcʜιᴇ007, Moses, Tog, mpy
If this question can be reworded to fit the rules in the help center, please edit the question.

If "development project" means compiling source code, then the major bottleneck is I/O rather than CPU. I'd be looking at faster mass storage, e.g. SATA 6 Gb/s and SSDs. Consider a disk caddy to replace the optical drive, and install a SSD as a second drive in the Thinkpad. – sawdust Oct 27 '13 at 22:41
@Moses I disagree. sawdust's reply shows how to answer the OP without specifying products. It is a question about capabilities, not about brands. – MariusMatutiae Oct 28 '13 at 6:11
Sure, the actual products that I mentioned were just to be more helpful and give context. I'm looking for a more general answer in terms of how I should plan out a system build. – Crunchy Oct 28 '13 at 6:29
I've removed the product mentions so that this question will be more useful to other users. – Crunchy Oct 28 '13 at 6:35
up vote 0 down vote accepted

To speed up compilation, you should create object files in tmpfs rather than a rotational hard disk. Since source files are cached in memory too, it is safe to assume that you are CPU bound (assuming you have enough RAM). If you have other laptops/desktops, I recommend to add them to a compiler cluster for improved build times. Compilation can often be parallelized.

As for the hardware:

  • Pick a SSD to store the OS and source files, this should reduce startup times (the time that is needed to read the sources into the filesystem cache).
  • Pick at least 8 GB RAM, 16 GB or more is recommended. I managed to finish a buildroot build with all source and object files on a 16GB tmpfs.
  • Focus on the CPU, the more cores/threads, the better.

Benchmarks (time in seconds, three trials without other significant processes running, standard deviation between parentheses, -jN indicates number of parallel units):

CPU     C/T   RAM    -j4         -j8         -j12        -j16
i5-460M 2/4   8 GB   337 (1.28)  344 (1.04)
i5-2320 4/4  24 GB   163 (2.35)  158 (0.20)  159 (0.50)  159 (0.33)
i7-3770 4/8  24 GB   133 (0.31)  110 (0.15)  108 (0.06)  109 (0.26)

distcc (100 Mbit LAN, node -- router -- node)
 -j20 (priority: remote i7-3770 16, local  i5-460M  4):  186 (7.36)
 -j20 (priority: local  i5-460M  4, remote i7-3770 16):  184 (1.40)

 -j20 (priority: local  i7-3770 16, remote i5-460M  4):  104 (2.26)
 -j24 (priority: local  i7-3770 16, remote i5-460M  8):  101 (1.24)

C/T = Cores/Threads, -j12,-j16 were skipped for i5-460M as that would be very slow anyway.

The time to copy the sources to tmpfs (from SSD) have not been incorporated, the numbers show raw performance for make bzImage modules (link to benchmark script). No swap file has been used.

The distcc processes appear to be I/O bound when using my laptop as local, while watching vnstat, I found that the TX+RX stuck at around 80 Mbit/s. It is also important to set the local distcc host to localhost (and not the address of the node) as this would otherwise cause a performance drain (for local i7-3770, remote i5-460M, -j20 resulted in 144 (sdev 0.65), that's a 40 seconds performance hit!).

share|improve this answer
Exactly the type of answer I was looking for. Thanks! – Crunchy Oct 28 '13 at 18:54

Not the answer you're looking for? Browse other questions tagged or ask your own question.