User talk:Pietinger/Tutorials/Optimize compile times

With regard to using tmpfs for compile, I find that as long as the system is reasonably stable and not going to crash it's simpler to temporarily set the following via sysctl:
 * vm.dirty_ratio=90
 * vm.dirty_background_ratio=85
 * vm.dirty_writeback_centisecs=60000 #ten minutes is a reasonable compromise.

This allows the system to keep written files in the disk cache much longer, so the files created during the compile process won't ever touch the disk if you have sufficient memory and the compile is faster than the writeback timeout. The install is still safe since it calls sync. If you run short on memory the system will automatically push things out of the cache to make space. So you get most of the speed improvement of using a tmpfs, without the hassle of doing the memory management yourself.

--Tlhonmey (talk) 16:48, 16 February 2023 (UTC)