1 |
Paul Hartman wrote: |
2 |
> On Fri, Sep 30, 2011 at 11:25 AM, Mark Knecht<markknecht@×××××.com> wrote: |
3 |
>> Hi, |
4 |
>> Is there a portage option that will limit the number of cores used |
5 |
>> by emerge? For instance, in a chroot on a 12 core machine I want to |
6 |
>> limit emerge to not using more than 3 cores? |
7 |
>> |
8 |
>> If possible, I'd also like to limit the total disk bandwidth |
9 |
>> consumption during emerge. For instance, when untarring a big file to |
10 |
>> do the emerge at times the disk consumption gets to high and the |
11 |
>> machine becomes laggy. Is there an option that addresses this? |
12 |
>> |
13 |
>> These questions are mostly about being able to update a chroot |
14 |
>> mid-day without other tasks slowing down too much. I don't care how |
15 |
>> long the chroot really takes to get a huge emerge done, but rathe just |
16 |
>> keeping the machine very responsive while it's happening. I already |
17 |
>> use: |
18 |
>> |
19 |
>> MAKEOPTS="-j3" |
20 |
>> PORTAGE_NICENESS="15" |
21 |
>> |
22 |
>> which helps (I think) but it doesn't totally address either of the issues above. |
23 |
> If your MAKEOPTS is -j3 then it's not going to use more than 3 cores |
24 |
> at a time but it will touch all 12 cores throughout the process |
25 |
> because of the normal load balancing. If you want it to use only 3 |
26 |
> specific cores, you would need to set the processor affinity (usually |
27 |
> done using the "taskset" command from sys-apps/util-linux). |
28 |
> |
29 |
> For the disk I/O you can set an ionice in your make.conf like: |
30 |
> PORTAGE_IONICE_COMMAND="ionice -c 3 -p \${PID}" |
31 |
> |
32 |
> Salt to taste. :) |
33 |
> |
34 |
> |
35 |
|
36 |
Well, this is interesting: |
37 |
|
38 |
root@fireball # emerge -1av kate |
39 |
ionice: bad prio class -3 |
40 |
* PORTAGE_IONICE_COMMAND returned 1 |
41 |
* See the make.conf(5) man page for PORTAGE_IONICE_COMMAND usage |
42 |
instructions. |
43 |
|
44 |
When I went to copy this, I noticed it was commented out. Now I see |
45 |
why. What's up with this? |
46 |
|
47 |
I bet Mark is going to get this too. |
48 |
|
49 |
Dale |
50 |
|
51 |
:-) :-) |