On Tue, 27 Apr 2021 20:53:11 +0000, Alan Mackenzie wrote:

> Help!  What am I supposed to do?  I've got 16 Gb RAM (I'm _not_ going to
> use the word "only" here), and wondering just how big a chunk a ram disk
> can take out of that before the machine siezes up altogether.  But if I
> increase the ram disk to 15 Gb, even assuming it'd work, it's only going
> to be a small number of releases before the clever people at rust
> increase their bloat even more.

Setting the RAM disk so high will mean you don't have enough memory for
the compilation, which will start swapping and everything will grind to a
near halt.

> I know I could plump for the -bin package.  Maybe I should.  But before
> I do that, is it possible to redirect this one ebuild away from
> /var/tmp/portage (my ram disk) without disturbing the other builds?  If
> so, how would I do this (or where should I look for documentation)?

Lookup package.env on the wiki. I use rust-bin now, so this isn't an
issue for me, but my laptop has only 8GB and this is how I have it set
for chromium:

% cat /etc/portage/env/disk-tmpdir.conf
PORTAGE_TMPDIR="/mnt/scratch"

% cat /etc/portage/package.env/chromium
www-client/chromium disk-tmpdir.conf

I do similar for libreoffice and a couple of other heavyweights.

Another option, to be used instead of or as well as this would be distcc.
Once again, you can use package.env to apply this to selected packages:

% cat /etc/portage/env/distcc.conf
FEATURES="distcc buildpkg distlocks"
MAKEOPTS="-j36 -l4"
CFLAGS="-march=broadwell -O2 -pipe"
CXXFLAGS="${CFLAGS}"


-- 
Neil Bothwick

I'm firm. You're obstinate. He's a pigheaded fool.

Attachment: pgpdVd7xzgkT5.pgp
Description: OpenPGP digital signature

Reply via email to