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 13:23:13
Message-Id: 5126763.L5XyAvMajf@eve
In Reply to: Re: [gentoo-user] is multi-core really worth it? by Raffaele Belardi
1 On Wednesday, November 22, 2017 2:12:31 PM CET Raffaele Belardi wrote:
2 > Jeremi Piotrowski wrote:
3 > > That being said: if you do a world rebuild you will have lots of packages
4 > > that spend ~40 seconds doing their autoconf run, only to build 2-3 sources
5 > > files. On an 8-core machine at work, I get good results using parallel
6 > > emerge jobs (emerge -jX). For your 6-core AMD CPU (assuming it actually
7 > > has 12 threads) I'd start with 'emerge -j3' and MAKEOPTS='-j12 -l16'.
8 > > That should get you a nice speedup, but may require a bit more ram.
9 >
10 > emerge -j3 is something I did not think of, I'll try it. But won't that
11 > break portage's carefully crafted package dependencies? I suppose you could
12 > get occasional build failures?
13
14 No, it won't.
15 If it has multiple packages that can be built (taking dependencies into
16 account) it will. If all packages in the queue are waiting for a single
17 package to be installed, all those will wait till that package is finished.
18
19 > I'm using MAKEOPTS=-j7, I thought 2 threads per CPU (hyperthreading?) was an
20 > Intel thing only.
21
22 I thought so too.
23
24 Don't forget to add the "load-average" option to both, otherwise there is a
25 very likely chance you will have 3 * 7 = 21 build processes running at the
26 same time.
27
28 Also, I have had situations where using "-j" actually caused some issues where
29 it was picked up by the wrong process or it has a different meaning for some
30 other process. Specifying the long version (--jobs) has been reliable for me.
31
32 --
33 Joost