[distcc] homogeneous environments

Fergus Henderson fergus.henderson at gmail.com
Tue May 5 15:46:22 GMT 2009


On Thu, Apr 30, 2009 at 9:07 PM, Robert W. Anderson <
anderson110 at poptop.llnl.gov> wrote:

> Fergus Henderson wrote:
>
>> The include server could be the bottleneck.  What's the CPU usage for the
>> include server process?
>> Or it could be disk I/O.  Try iostat or vmstat to profile that.
>>
>
> After some more experimentation, I think I may have a clue what's going on
> here.  I think I may be getting bound up in context switching costs, both in
> my single node performance and on localhost using distcc.
>
> On a single node:
>
> -j4: 24 million context switches @ 10us = 4m
> -j8: 96 million context switches @ 10us = 16m
> ...
>
I don't understand why doubling the job count increases context switching by
> 4x.  Any insights appreciated.
>

You mentioned earlier that your host has four processors.
With -j4, you have number of processors = number of jobs, so to a first
approximation the only context switches should be switching between user
mode and kernel mode for system calls, I/O or paging.
With -j8, you now have two jobs for each processor, so you're doing
additional context switches for time slicing between different user mode
processes.  Depending on the time slice, that could be arbitrarily higher.

Cheers,
  Fergus.

-- 
Fergus Henderson <fergus.henderson at gmail.com>
-------------- next part --------------
HTML attachment scrubbed and removed


More information about the distcc mailing list