Gentoo Archives: gentoo-user

From: Alan Mackenzie <acm@×××.de>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Rusty problems
Date: Wed, 28 Apr 2021 11:12:42
Message-Id: YIlDIc1bqndUvDEo@ACM
In Reply to: Re: [gentoo-user] Rusty problems by Neil Bothwick
1 Hello, Neil.
2
3 On Wed, Apr 28, 2021 at 00:09:12 +0100, Neil Bothwick wrote:
4 > On Tue, 27 Apr 2021 20:53:11 +0000, Alan Mackenzie wrote:
5
6 > > Help! What am I supposed to do? I've got 16 Gb RAM (I'm _not_ going to
7 > > use the word "only" here), and wondering just how big a chunk a ram disk
8 > > can take out of that before the machine siezes up altogether. But if I
9 > > increase the ram disk to 15 Gb, even assuming it'd work, it's only going
10 > > to be a small number of releases before the clever people at rust
11 > > increase their bloat even more.
12
13 > Setting the RAM disk so high will mean you don't have enough memory for
14 > the compilation, which will start swapping and everything will grind to a
15 > near halt.
16
17 I think that was happening when I tried to use a 14 GB ram disk.
18
19 > > I know I could plump for the -bin package. Maybe I should. But before
20 > > I do that, is it possible to redirect this one ebuild away from
21 > > /var/tmp/portage (my ram disk) without disturbing the other builds? If
22 > > so, how would I do this (or where should I look for documentation)?
23
24 > Lookup package.env on the wiki.
25
26 Many thanks for the tip. I did this, and set up my PORTAGE_TMPDIR to
27 point into /home/portage. Not the ideal place, but the only place with
28 enough room, without messing around with mdadm to create more.
29
30 > I use rust-bin now, so this isn't an issue for me, but my laptop has
31 > only 8GB and this is how I have it set for chromium:
32
33 > % cat /etc/portage/env/disk-tmpdir.conf
34 > PORTAGE_TMPDIR="/mnt/scratch"
35
36 > % cat /etc/portage/package.env/chromium
37 > www-client/chromium disk-tmpdir.conf
38
39 > I do similar for libreoffice and a couple of other heavyweights.
40
41 With a like setup, building rust took ~45 minutes. This is about the
42 same as it took on the ram disk before giving up. So, I'm not losing a
43 lot, if anything, by using /home/portage (On mirrored nvme SSDs).
44
45 > Another option, to be used instead of or as well as this would be distcc.
46 > Once again, you can use package.env to apply this to selected packages:
47
48 That's for building on a different (more powerful) machine, isn't it? I
49 don't actually have a more powerful machine. ;-)
50
51 > % cat /etc/portage/env/distcc.conf
52 > FEATURES="distcc buildpkg distlocks"
53 > MAKEOPTS="-j36 -l4"
54 > CFLAGS="-march=broadwell -O2 -pipe"
55 > CXXFLAGS="${CFLAGS}"
56
57
58 > --
59 > Neil Bothwick
60
61 > I'm firm. You're obstinate. He's a pigheaded fool.
62
63 At times, I'm all three!
64
65 --
66 Alan Mackenzie (Nuremberg, Germany).

Replies

Subject Author
Re: [gentoo-user] Rusty problems Neil Bothwick <neil@××××××××××.uk>