Discussion:
[distcc] fix Issue #145. Allow -j (jobs) param to set number slots when used in zeroconf mode.
Eric Fontaine
2016-07-03 09:13:53 UTC
Permalink
To fix issue https://github.com/distcc/distcc/issues/145 I submitted the
following pull request: https://github.com/distcc/distcc/pull/187

"If server is started in zeroconf mode, the previous behavior was that
the number of slots for any server was hardcoded to 4 * number of cpus.
This made zeroconf impracticle when different hosts had different core
counts.
This commit allows distccd to be invoked in zeroconf mode with the -j
parameter to specify total slots for the particular server being
invoked.
If no -j specified, then this host will publish its total number of
slots to be 2 * number of cores + 2. (Note: this is the same behavior as
when invoking a non-zerconf server without specifying -j.)
To maintain backward compatibily, if a distccd zeroconf server doesn't
publish a value for slots, then it will be assigned a default total
slots equal to the previous behavior of 4 * number of cores.
Note that the meaning of 'slots' in the code now always refers to the
number of slots per host. (The previous interepration of 'slots' was
inconsistent, because sometimes it meant the number of slots per core.)"

I've tested my fixed zeroconf mode on my home network which has one
computer with 8 cores and one with 2 cores, and it seems to be working.
I had commented on your github issue page a couple months ago but no
response, but no response. Anyway, I was wanting for a solution since I
have a bunch of machines with different core counts, and sometimes I
don't have them all powered on, and I didn't want to have to change
configuration based on what computers I had powered on at the moment.

Anyway, I think others might also want this so please consider this pull
request. I tried to keep the prior behavior as much as possible and
stick with same code style, but let me know if I should change anything.

-Eric Fontaine

__
distcc mailing list http://distcc.samba.org/
To unsubscribe or change options:
https://lists.samba.org/mailman/listinfo/distcc

Loading...