▲ | menaerus 3 days ago | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
On 40-core or 64-core machine there's more compute than you will ever need for a compilation process. Compilation is a heavy I/O workload not a heavy compute workload, in most cases, where it actually matters. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
▲ | lingolango 3 days ago | parent | next [-] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Linux is ~1.5GB of source text and the output is typically a binary less than 100MB. That should take a few hundred milliseconds to read in from an SSD or be basically instant from RAM cache, and then a few hundred ms to write out the binary. So why does it take minutes to compile? Compilation is entirely compute bound, the inputs and outputs are minuscule data sizes, in the order of megabytes for typical projects - maybe gigabytes for multi million line projects, but that is still only a second or two from an SSD. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
▲ | anarazel 3 days ago | parent | prev [-] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This is just wildly wrong. On an older 2 socket workstation, with relatively poor memory bandwidth, I ran a linux kernel compile.
indicates that memory bandwidth is not a bottleneck. Fetch latency, branch mispredicts and the frontend are.I also analyzed the memory bandwidth using
and it never gets anywhere close to the memory bandwidth the system can trivially utilize (it barely reaches the bandwidth a single core can utilize).iostat indicates there are pretty much no reads/writes happening on the relevant disks. Every core is 100% busy. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|