Comment 2 for bug 497645

Revision history for this message
James Troup (elmo) wrote : Re: [Bug 497645] Re: code imports should run fewer jobs at once

Michael Hudson <email address hidden> writes:

> I talked about this with Aaron a little, and we decided that passing
> the number of CPUs on the slave to the getJobForMachine XML-RPC call
> would be less work. "os.sysconf('SC_NPROCESSORS_ONLN')" is a way to
> find the number of CPUs.

This will misrepresent the capacity of SMT boxes (as our current
generation of servers are) and for something like code import that's
probably bad (it's not the kind of work load which will benefit from
scaling with number of threads rather than cores).

That said, I'm afraid I don't know a particular clean way to detect
active SMT other than to check for duplicate core id's in /proc/cpuinfo.
(And bear in mind that older CPUs won't have a core ID in /proc/cpuinfo)

--
James