Gentoo Archives: gentoo-user

From: "J. Roeleveld" <joost@××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] is multi-core really worth it?
Date: Wed, 22 Nov 2017 08:32:09
Message-Id: 2631935.PigJGvPPt2@eve
In Reply to: Re: [gentoo-user] is multi-core really worth it? by David Haller
1 On Wednesday, November 22, 2017 8:48:08 AM CET David Haller wrote:
2 > Hello,
3 >
4 > On Wed, 22 Nov 2017, Raffaele Belardi wrote:
5 > >rebuilding system and world with gcc-7.2.0 on a 6-core AMD CPU I have
6 > >the impression that most of the ebuilds limit parallel builds to 1, 2
7 > >or 3 threads.
8 >
9 > Most should build with "many" cores, but some might be limited, but ...
10 >
11 > >I'm aware it is only an impression, I did not spend the
12 > >night monitoring the process, but nevertheless every time I checked
13 > >the load was very low.
14 >
15 > I guess you're mostly observing stalls because the (single-thread)
16 > overhead of emerge, configure (etc.), which can also be IO-bound...
17 > The actual builds probably goes so fast on your box, you hardly
18 > notice unless they're rather big(gish).
19 >
20 > Some numbers for comparison, and I generally build with just one
21 > thread in the background on my 2 core "old" Athlon II X2 250:
22 > dev-libs/boost took a good 45mins to build with one thread. Divide by
23 > 6 for your cores, divide again by about 2-3 for your newer cores and
24 > you're in the 3:45min range for such a "biggie" as boost. Most other
25 > stuff won't even peg your meter.
26 >
27 > So, your emerge is mostly IO and "emerge"-threads bound. Solution:
28 > adjust your build-threads[1], and then adjust your emerge jobs! See
29 > '--jobs' in 'man emerge'. Can't find where to set a default in a
30 > config-file for that ATM, but you could always alias/function/script
31 > emerge to something else, e.g. put this in your ~/.bashrc:
32
33 Instead of all these aliases, simply edit your make.conf ( /etc/portage/
34 make.conf )
35
36 And edit (or add) the following lines:
37 MAKEOPTS="--jobs 24 --load-average 48"
38 EMERGE_DEFAULT_OPTS="--jobs 24 --load-average 48"
39
40 Adjust the values to match your system, the above works fine on my desktop.
41 CPU: Intel(R) Core(TM) i7-5820K CPU @ 3.30GHz
42 And 32GB ram.
43
44 --
45 Joost

Replies

Subject Author
Re: [gentoo-user] is multi-core really worth it? David Haller <gentoo@×××××××.de>