3 ms·
Does compiling the Linux kernel really scale to that many cores?
by sapiogram 3y ago
Does compiling the Linux kernel really scale to that many cores?
- hnav 3y agonot sure about the kernel in particular, but if you have 100 compilation units you can scale to 100 cores
- deleted 3y ago[deleted]
- StillBored 3y agoWell, in my case I have access to a couple servers with >250 threads, and it will happily peg all those out until it has to put vmlinux together, then it goes down to a thread or two for a bit, and then they all go back to 100% while the modules are processed. So, yes, but presumably given enough threads the limit becomes how fast one can collect and link the vmlinux which is mostly still done serially ala Amdahl's law. Oh and there is some IO/etc bounding at the beginning checking the config/etc. Some sites have kernel compile benchmarks and for the most part they tend to indicate nearly linear scalability. Although there tend to be two major config differences, some people benchmark with something like an allmodconfig vs people who benchmark with a more minimal kernel module setup. The former are the ones that can be as slow as an hour or so on machines without a lot of cores, and the latter are the ones that finish in sub 60 seconds on fairly modest hardware. But given enough cores its possible to turn the former into he latter.
- menaerus 3y agoC and C++ compilation model allows compilation of separate translation units in parallel so yes. Linking compiled translation units together is also taking advantage of multiple cores but it's not easily "parallelizable" as compilation step is.