2018-02-08 20:13 GMT+02:00 Rich Freeman <ri...@gentoo.org>: > On 08/02/18 19:11, gevisz wrote: >> >> I never used tmpfs for portage TMPDIR before and now decided to give it a >> try. >> >> I have 8GB of RAM and 12GB of swap on a separate partition. >> >> Do I correctly understood >> https://wiki.gentoo.org/wiki/Portage_TMPDIR_on_tmpfs >> that I can safely set in the fstab the size of my tmpfs to 12GB so >> that the chromium could be emerged in tmpfs (using the swap) >> without the need to set notmpfs.conf for chromium and the likes. > > You can try it, but for Chromium these days you might find that still > doesn't perform great. I have 16GB of RAM (no swap) and have moved > back to building on SSD for that one package (with ccache to help). > > In an ideal world swap would STILL be better than building on disk, > because it gives the kernel fewer constraints around what gets written > to disk.
> Anything written to disk MUST end up on the disk within the dirty > writeback time limit. Anything written to tmpfs doesn't ever have to > end up on disk, and if it is swapped the kernel need not do it in any > particular timeframe. Also, the swapfile doesn't need the same kinds > of integrity features as a filesystem, which probably lowers the cost > of writes somewhat (if nothing else after a reboot there is no need to > run tmpreaper on it). > So, swapping SHOULD still be better than building on disk, because any > object file that doesn't end up being swapped is a saved disk IO, and > the stuff that does get swapped will hopefully get written at a more > opportune time vs forcing the kernel to stop what is doing after 30s > (by default) to make sure that something gets written no matter what > (if it wasn't deleted before then). Thank you for the reply. I probably try a pure tmpfs + swap solution. If it fails some day, I will then add notmpfs exceptions. However, it probably won't be sooner than # emerge --update --deep --with-bdeps=y --newuse --backtrack=90 --ask world --exclude chromium fails because of the "--exclude chromium" part :), as I have already compiled the recent vertion of chromium with /var/tmp/portage on the hard disk and it took more than 24 hours on my old AMD Athlon X2 with j2 option. :(