On Fri, Sep 30, 2011 at 3:09 PM, Neil Bothwick <n...@digimed.co.uk> wrote: > On Fri, 30 Sep 2011 11:15:16 -0700, Mark Knecht wrote: > >> > If your MAKEOPTS is -j3 then it's not going to use more than 3 cores >> > at a time but it will touch all 12 cores throughout the process >> > because of the normal load balancing. If you want it to use only 3 >> > specific cores, you would need to set the processor affinity (usually >> > done using the "taskset" command from sys-apps/util-linux). > >> My experience with -j3 is not that it limits emerge to 3 CPU cores but >> rather it limits emerge to running 3 _jobs_. There's a big difference. >> 1 job can use 12 cores if gcc spawns a lot of stuff in parallel, which >> in my experience it does. It's this parallel spawn running up to 12 >> cores in use which causes the machine to lag. Even when not setting >> the -j option at all which results in a single package being emerged >> at one time, I often use 6-12 cores in use for short periods of time >> as gcc builds that package. > > That's the --jobs option for emerge. The suggestion was to set the -J > option in MAKEOPTS, which tells GCC how many compilation threads to run > at once, and that's one core per thread. You'll also need to set -j 1 for > emerge, which will also reduce the amount of disk thrashing that can > happen when two package hit unpack at the same time. > > > -- > Neil Bothwick
OK, my bad for confusing the two. Currently make.conf in the chroot says: MAKEOPTS="-j3" and when I run emerge in the chroot it's typically emerge -DuN -j2 @world so I think that's about right, or would hope it is anyway. If you see a problem please let me know. I'll add the ionice stuff this weekend and see how it goes. Thanks, Mark