Hacker News new | ask | show | jobs
by MayeulC 1965 days ago
Well, you can always move your code to a ramdisk, I suspect any C(++) isn't more than a few GB anyway ?
3 comments

Most compilers won't fsync will they? The output is likely not being written straight to disk.

It's caches all the way down.

And to max out disk bandwidth before you max out your CPU cores you need a really terrible disk.

I don't think many 8-way Xeon Platinum boxes have eMMC storage.

Well, using ramdisks will let you compare and make sure the disk isn't the bottleneck, at least.
But all compilers will close(). Compare compile times on tmpfs and you will see an improvement.
You don't even need to do this just cat all the files to /dev/null to prime the cache
With gentoo i use tmpfs and it works really well
Do you have details on how to enable this?
Just mount a ramdisk over your portage TMPDIR (default /var/tmp/portage). You will need a decent amount of ram though for larger packages like LLVM. Disabling debug symbols will reduce the required space a bit.