On 11/12/2012 09:11 AM, Tim St Clair wrote:
of note: current cpu_shares (which only exists on master) uses SlotWeight, where I think it should really be TotalSlotCpus.
Open Questions:
Does anyone have a good way of *really* testing cpu_shares?
I'm all ears if anyone has a good idea of how to test this. What I've
done in the past is to time a busy-loop that forks four times. Time
this once with affinity on, and once with it off. One confusing thing
is that, at least with affinity, all four cpu-bound processes stay in
"R" state, even though they aren't actually running, and the load
average will go up to four, even though there aren't four busy cpus.
This has been surprising in production, because some matlab (and other)
jobs parse /proc/cpuinfo, and then spawn that many threads, which is
generally not optimal when the job has access to fewer cores than
/proc/cpuinfo would indicate.
-greg
|