On 18/04/2023 21:01, Dale wrote:
I just use tmpfs for /var/tmp/portage (16GB, I'm on 32GB RAM.) When I
keep binary packages around, those I have on my HDD, as well as the
distfiles:

DISTDIR="/mnt/Data/gentoo/distfiles"
PKGDIR="/mnt/Data/gentoo/binpkgs"


Most of mine is in tmpfs to except for the larger packages, such as
Firefox, LOo and a couple others.  Thing is, those few large ones would
rack up a lot of writes themselves since they are so large.  That said,
it would be faster.  😉

Not sure if it's set up on my current system, but I always configured /var/tmp/portage on tmpfs. And on every disk I allocate a swap partition equal to twice the mobo's max memory. Three drives times 64GB times two is a helluva lot of swap.

So here I would just allocate /var/tmp/portage maybe 64 - 128 GB of space. If the emerge fits in my current 32GB ram, then fine. If not, it spills over into swap. I don't have to worry about allocating extra space for memory hogs like Firefox, LO, Rust etc.

And seeing as my smallest drive is 3TB, losing 128GB per drive to swap isn't actually that much.

Although, as was pointed out to me, if I did suffer a denial-of-service attack that tried to fill memory, that amount of swap would knacker my system for a LONG time.

Cheers,
Wol

Reply via email to