1 |
On Fri, 30 Sep 2011 11:15:16 -0700, Mark Knecht wrote: |
2 |
|
3 |
> > If your MAKEOPTS is -j3 then it's not going to use more than 3 cores |
4 |
> > at a time but it will touch all 12 cores throughout the process |
5 |
> > because of the normal load balancing. If you want it to use only 3 |
6 |
> > specific cores, you would need to set the processor affinity (usually |
7 |
> > done using the "taskset" command from sys-apps/util-linux). |
8 |
|
9 |
> My experience with -j3 is not that it limits emerge to 3 CPU cores but |
10 |
> rather it limits emerge to running 3 _jobs_. There's a big difference. |
11 |
> 1 job can use 12 cores if gcc spawns a lot of stuff in parallel, which |
12 |
> in my experience it does. It's this parallel spawn running up to 12 |
13 |
> cores in use which causes the machine to lag. Even when not setting |
14 |
> the -j option at all which results in a single package being emerged |
15 |
> at one time, I often use 6-12 cores in use for short periods of time |
16 |
> as gcc builds that package. |
17 |
|
18 |
That's the --jobs option for emerge. The suggestion was to set the -J |
19 |
option in MAKEOPTS, which tells GCC how many compilation threads to run |
20 |
at once, and that's one core per thread. You'll also need to set -j 1 for |
21 |
emerge, which will also reduce the amount of disk thrashing that can |
22 |
happen when two package hit unpack at the same time. |
23 |
|
24 |
|
25 |
-- |
26 |
Neil Bothwick |
27 |
|
28 |
If at first you don't succeed, skydiving is not for you. |