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_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.
- First of all: Thanks a lot for your hint ! I will copy it into my article ... IF you think it is matching here ... but maybe it is even more better in Portage_TMPDIR_on_tmpfs ? What do you think ? --Pietinger 18:17, 16 February 2023 (UTC)
- I'm not entirely sure. I ended up here after your writeup was referenced on the user mailing list. It might be good to mention on the tmpfs page, but I don't know that it makes the most sense to put a description of something other than using tmpfs on the tmpfs page, whereas your page seems to be more generic tips and tricks that aren't necessarily limited to one particular approach. (In case it wasn't clear, tweaking the cache settings largely obviates the need to use tmpfs at all rather than being something to use in addition to setting up a tmpfs.) --Tlhonmey (talk) 23:34, 17 February 2023 (UTC)
- Done ;-) Thanks again ! --Pietinger 00:20, 19 February 2023 (UTC)