Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 438650 - --jobs takes too long to spawn new jobs with high numbers when --load-average is used
Summary: --jobs takes too long to spawn new jobs with high numbers when --load-average...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Enhancement/Feature Requests (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 184128 431026 476104
  Show dependency tree
 
Reported: 2012-10-17 02:05 UTC by Rick Farina (Zero_Chaos)
Modified: 2013-07-07 20:03 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rick Farina (Zero_Chaos) gentoo-dev 2012-10-17 02:05:21 UTC
when attempting to spawn lots of jobs but keep under a certain --load-average, emerge automatically delays the spawning of new jobs.

The default settings work great for my 4 core laptop, but when trying to hit --load-average=32 it chokes.  I get 2-5, sometimes even 6 running jobs, but load average hovers around 8, maxing around 14-16.  This is caused by jobs completing too quickly but not being allowed to spawn more jobs fast enough to increase the load average.

With the help of zmedico I messed with /usr/lib/portage/pym/_emerge/Scheduler.py specifically self._job_delay_max and _loadavg_latency.  I found that setting these to 5 was able to nearly max my cpu, while setting 2 was maxing out my crappy hdd IO and slowed down build by a small percentage.

The IO issue is really my issue, need to take this crappy hdd out but the ssd I ordered came broken.  I only mention my IO issue for completeness in this report.
Comment 1 Rick Farina (Zero_Chaos) gentoo-dev 2012-10-17 03:16:13 UTC
A little more details of my testing:

time emerge ettercap aircrack-ng wireshark irssi xchat @x11-module-rebuild -vt1

both variables set to 5 seconds
real    6m22.386s
user    51m30.286s
sys     21m34.309s

both set to 2 seconds (my IO hit max)
real    6m38.912s
user    52m8.455s
sys     23m47.197s

both set to 2 seconds and using tmpfs for /var/tmp/portage/
real    5m54.879s
user    51m11.274s
sys     18m50.599s

both set to 2 seconds and using tmpfs for /var/tmp/portage/
real    5m54.672s
user    51m23.374s
sys     18m54.213s

and then I got bored
Comment 3 Zac Medico gentoo-dev 2012-10-17 04:35:20 UTC
(In reply to comment #2)
> Hopefully this is better:
> 
> http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;
> h=fdb856ae456a559fa74066704cd19858d317ed33

This patch is in 2.1.11.29 and 2.2.0_alpha140.
Comment 4 Rick Farina (Zero_Chaos) gentoo-dev 2012-10-17 04:55:28 UTC
Portage before fix:

real    7m51.775s
user    50m31.985s
sys     18m4.628s


Portage after fix:

real    5m55.700s
user    52m3.284s
sys     19m3.982s


My best time was 5m54 when I was editing things, so I'd have to give this my stamp of approval!
Comment 5 Zac Medico gentoo-dev 2012-10-17 04:59:40 UTC
Thanks for testing. I guess we can consider this fixed for now (though we may come up with additional tweaks later).