Gentoo Archives: gentoo-user

From: Michael <confabulate@××××××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Jobs and load-average
Date: Wed, 15 Feb 2023 15:12:45
Message-Id: 4123775.1IzOArtZ34@lenovo.localdomain
In Reply to: Re: [gentoo-user] Jobs and load-average by Peter Humphrey
1 On Wednesday, 15 February 2023 14:31:25 GMT Peter Humphrey wrote:
2 > On Wednesday, 15 February 2023 13:18:24 GMT Rich Freeman wrote:
3 > > On Wed, Feb 15, 2023 at 4:56 AM Peter Humphrey <peter@××××××××××××.uk>
4 >
5 > wrote:
6 > > > Not long ago I read that we should allow 2GB RAM for every emerge job -
7 > > > that is, we should divide our RAM size by 2 to get the maximum number of
8 > > > simultaneous jobs. I'm trying to get that right, but I'm not there yet.
9 > > >
10 > > > I have these entries in make.conf:
11 > > > EMERGE_DEFAULT_OPTS="--jobs=16 --load-average=32 --autounmask=n --quiet-
12 > > > unmerge-warn --ke>
13 > > > MAKEOPTS="-j16"
14 > > >
15 > > > Today, though, I saw load averages going up to 72. Can anyone suggest
16 > > > better values to suit my 24 threads and 64GB RAM?
17 > >
18 > > First, keep in mind that --jobs=16 + -j16 can result in up to 256
19 > > (16*16) tasks running at once. Of course, that is worst case and most
20 > > of the time you'll have way less than that.
21 > >
22 > > Keep in mind that you need to consider available RAM and not just
23 > > total RAM. Run free under the conditions where you typically run
24 > > emerge and see how much available memory it displays. Depending on
25 > > what you have running it could be much lower than 64GB.
26 > >
27 > > Beyond that, unfortunately this is hard to deal with beyond just
28 > > figuring out what needs more RAM and making exceptions in package.env.
29 > >
30 > > Also, RAM pressure could also come from the build directory if it is
31 > > on tmpfs, which of course many of us use.
32 > >
33 > > Some packages that I build with either a greatly reduced -j setting or
34 > > a non-tmpfs build directory are:
35 > > sys-cluster/ceph
36 > > dev-python/scipy
37 > > dev-python/pandas
38 > > app-office/calligra
39 > > net-libs/nodejs
40 > > dev-qt/qtwebengine
41 > > dev-qt/qtwebkit
42 > > dev-lang/spidermonkey
43 > > www-client/chromium
44 > > app-office/libreoffice
45 > > sys-devel/llvm
46 > > dev-lang/rust (I use the rust binary these days as this has gotten
47 > > really out of hand)
48 > > x11-libs/gtk+
49 > >
50 > > These are just packages I've had issues with at some point, and it is
51 > > possible that some of these packages no longer use as much memory
52 > > today.
53 >
54 > Thank you all. I can see what I'm doing better now. (Politicians aren't the
55 > only ones who can be ambiguous!)
56 >
57 > I'll start by picking up the point I'd missed - putting MAKEOPTS in
58 > package.env.
59
60 You can have both a generic MAKEOPTS in make.conf, which suits your base case
61 of emerge operations and will not cause your PC to explode when combined with
62 EMERGE_DEFAULT_OPTS, as well as package specific MAKEOPTS in package.env to
63 finely tune individual package requirements.

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-user] Jobs and load-average Peter Humphrey <peter@××××××××××××.uk>