getting distcc to compile without localhost

View: New views
10 Messages — Rating Filter:   Alert me  

getting distcc to compile without localhost

by Chris Robison :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

What is required to prevent distcc from using localhost?

I am using distcc to speed up builds in Gentoo, and so far it's working
pretty well. The problem is that I have a slow machine and a faster
server to help it, and so I think I'd get better performance if the slow
local machine were not compiling at all. At any rate, I'd like to try it
to see.

At the moment, distcc is dividing up compilation evenly between the two
machines. I have only one entry in /etc/distcc/hosts, the IP address of
the remote server. Localhost is not listed in the file.  I can run
distcc --show-hosts, and it also only returns the remote IP address. Yet
when I do an emerge, the compilation is still evenly split between the
two computers.

I asked around on IRC, and one response was that I had to include
"localhost/0" in /etc/distcc/hosts, to force it to send zero jobs to
localhost.  I tried adding this entry to the file along with the
existing remote IP address, and immediately after the change, distcc
started sending ALL compiles to localhost. Changing it back also
immediately restored the original 50/50 behavior.

Either way, the verbose output from distcc shows nothing that appears to
be an error; I can post it if it helps.

This is a brand new Gentoo install, running distcc 3.1, portage
2.1.6.11, gcc 4.3.2, and the server is an amd64 host set up to
cross-compile (which seems to be working perfectly).

As a separate issue, so far I have yet to see distccmon-text output
anything but blank lines, running on either machine.

Thanks in advance,

  --chris


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

Re: getting distcc to compile without localhost

by mbp :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

2009/5/29 Chris Robison <chris@...>:
> What is required to prevent distcc from using localhost?

Unless something is broken, with the setup you describe distcc will
only do compiles on the localhost when that's necessary - for example
for linking or writing profile data.  The log file will tell you why
it decided to run a job locally.


--
Martin <http://launchpad.net/~mbp/>
__
distcc mailing list            http://distcc.samba.org/
To unsubscribe or change options:
https://lists.samba.org/mailman/listinfo/distcc

Re: getting distcc to compile without localhost

by Chris Robison :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Actually I think I may be misinterpreting the log output.

I was noticing lots of lines like:
distcc[19451] cpp libxslt.c on localhost completed ok


...which led me to believe that some work was being done on localhost.
But then just now I noticed it's also dumping lines like:
distcc[19451] compile libxslt.c on 192.168.0.10/10 completed ok

Different line, same filename. So, I don't think I'll continue this
thread until I'm certain of what I'm seeing.  To do that I think I need
to get the monitor running correctly, but I'll start another thread for
that.

Thanks,

  --chris



Martin Pool wrote:

> 2009/5/29 Chris Robison <chris@...>:
>  
>> What is required to prevent distcc from using localhost?
>>    
>
> Unless something is broken, with the setup you describe distcc will
> only do compiles on the localhost when that's necessary - for example
> for linking or writing profile data.  The log file will tell you why
> it decided to run a job locally.
>
>
>  

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

Re: getting distcc to compile without localhost

by Chris Robison :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Ok, looks like this has been unnecessary.  The blank monitor output,
(which started this whole adventure and all the second-guessing) appears
to be a Gentoo problem, and a very old one at that:

http://bugs.gentoo.org/51616

As explained in that bug entry, by executing

DISTCC_DIR=/var/tmp/portage/.distcc distccmon-text 1

I get the correct output.  Sure enough, instead of fixing the problem,
they put the step in their docs (which I had overlooked).


  --chris





Chris Robison wrote:

> Actually I think I may be misinterpreting the log output.
>
> I was noticing lots of lines like:
> distcc[19451] cpp libxslt.c on localhost completed ok
>
>
> ...which led me to believe that some work was being done on localhost.
> But then just now I noticed it's also dumping lines like:
> distcc[19451] compile libxslt.c on 192.168.0.10/10 completed ok
>
> Different line, same filename. So, I don't think I'll continue this
> thread until I'm certain of what I'm seeing.  To do that I think I
> need to get the monitor running correctly, but I'll start another
> thread for that.
>
> Thanks,
>
>  --chris
>
>
>
> Martin Pool wrote:
>> 2009/5/29 Chris Robison <chris@...>:
>>  
>>> What is required to prevent distcc from using localhost?
>>>    
>>
>> Unless something is broken, with the setup you describe distcc will
>> only do compiles on the localhost when that's necessary - for example
>> for linking or writing profile data.  The log file will tell you why
>> it decided to run a job locally.
>>
>>
>>  
>
> __ distcc mailing list            http://distcc.samba.org/
> To unsubscribe or change options:
> https://lists.samba.org/mailman/listinfo/distcc

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

Parent Message unknown Re: getting distcc to compile without localhost

by Fergus Henderson-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

If your host is slow, try using pump mode;
that moves more of the work to the remote hosts.
In particular the preprocessing (cpp).
So you may get better performance with pump mode.
--
Fergus Henderson <fergus@...>

On May 29, 2009 2:21 AM, "Chris Robison" <chris@...> wrote:

Actually I think I may be misinterpreting the log output.

I was noticing lots of lines like:
distcc[19451] cpp libxslt.c on localhost completed ok


...which led me to believe that some work was being done on localhost. But then just now I noticed it's also dumping lines like:
distcc[19451] compile libxslt.c on 192.168.0.10/10 completed ok

Different line, same filename. So, I don't think I'll continue this thread until I'm certain of what I'm seeing.  To do that I think I need to get the monitor running correctly, but I'll start another thread for that.

Thanks,

 --chris

Martin Pool wrote: > > 2009/5/29 Chris Robison <chris@...>: >   >> >> What is requi...

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


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

Re: getting distcc to compile without localhost

by Chris Robison :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Is there a way to get Gentoo portage to utilize pump mode?  I've tried
finding info online, but it's not in Gentoo's distcc doc and my
google-mojo has failed me ...

  --chris



Fergus Henderson wrote:

>
> If your host is slow, try using pump mode;
> that moves more of the work to the remote hosts.
> In particular the preprocessing (cpp).
> So you may get better performance with pump mode.
> --
> Fergus Henderson <fergus@... <mailto:fergus@...>>
>
>> On May 29, 2009 2:21 AM, "Chris Robison" <chris@...
>> <mailto:chris@...>> wrote:
>>
>> Actually I think I may be misinterpreting the log output.
>>
>> I was noticing lots of lines like:
>> distcc[19451] cpp libxslt.c on localhost completed ok
>>
>>
>> ...which led me to believe that some work was being done on
>> localhost. But then just now I noticed it's also dumping lines like:
>> distcc[19451] compile libxslt.c on 192.168.0.10/10
>> <http://192.168.0.10/10> completed ok
>>
>> Different line, same filename. So, I don't think I'll continue this
>> thread until I'm certain of what I'm seeing.  To do that I think I
>> need to get the monitor running correctly, but I'll start another
>> thread for that.
>>
>> Thanks,
>>
>>  --chris
>>
>> Martin Pool wrote: > > 2009/5/29 Chris Robison
>> <chris@... <mailto:chris@...>>: >   >> >>
>> What is requi...
>>
>> __ distcc mailing list            http://distcc.samba.org/ To
>> unsubscribe or change options: https:/...
>>

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

Re: getting distcc to compile without localhost

by Fergus Henderson-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

If gentoo is still using the vintage distcc 2.x, then pump mode isn't supported - you would need to update gentoo to use distcc 3.x.

--
Fergus Henderson <fergus@...>

On May 29, 2009 9:46 AM, "Chris Robison" <chris@...> wrote:

Is there a way to get Gentoo portage to utilize pump mode?  I've tried finding info online, but it's not in Gentoo's distcc doc and my google-mojo has failed me ...

 --chris



Fergus Henderson wrote:

> > > If your host is slow, try using pump mode; > that moves more of the work to the remote hosts. ...

Fergus Henderson <fergus@... <mailto:fergus@...>>

>> On May 29, 2009 2:21 AM, "Chris Robison" <chris@... <mailto:chris@...>>...

distcc[19451] compile libxslt.c on 192.168.0.10/10 <http://192.168.0.10/10> completed ok

>> >> Different line, same filename. So, I don't think I'll continue this thread until I'm certain ...

Martin Pool wrote: > > 2009/5/29 Chris Robison <chris@... <mailto:chris@...>>: >   >> >> What is requi...

>> >> __ distcc mailing list            http://distcc.samba.org/ To unsubscribe or change options: ...

__ distcc mailing list            http://distcc.samba.org/

To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/distcc


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

Re: getting distcc to compile without localhost

by Chris Robison :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Gentoo currently installs and uses distcc 3.1.

Portage invokes distcc itself, when "distcc" is included in the
"FEATURES" variable in /etc/make.conf (the file that configures the
process of building packages).  Since I'm not calling distcc (or make or
gcc) myself but rather it's being called by the framework, I'm curious
as to whether I can follow this advice about pump mode with Gentoo.

  --chris



Fergus Henderson wrote:

>
> If gentoo is still using the vintage distcc 2.x, then pump mode isn't
> supported - you would need to update gentoo to use distcc 3.x.
>
> --
> Fergus Henderson <fergus@... <mailto:fergus@...>>
>
>> On May 29, 2009 9:46 AM, "Chris Robison" <chris@...
>> <mailto:chris@...>> wrote:
>>
>> Is there a way to get Gentoo portage to utilize pump mode?  I've
>> tried finding info online, but it's not in Gentoo's distcc doc and my
>> google-mojo has failed me ...
>>
>>  --chris
>>
>>
>>
>> Fergus Henderson wrote:
>>
>>     > > > If your host is slow, try using pump mode; > that moves
>>     more of the work to the remote hosts. ...
>>
>>     Fergus Henderson <fergus@... <mailto:fergus@...>
>>     <mailto:fergus@... <mailto:fergus@...>>>
>>
>>         >> On May 29, 2009 2:21 AM, "Chris Robison"
>>         <chris@... <mailto:chris@...>
>>         <mailto:chris@...
>>         <mailto:chris@...>>>...
>>
>>         distcc[19451] compile libxslt.c on 192.168.0.10/10
>>         <http://192.168.0.10/10> <http://192.168.0.10/10> completed ok
>>
>>         >> >> Different line, same filename. So, I don't think I'll
>>         continue this thread until I'm certain ...
>>
>>         Martin Pool wrote: > > 2009/5/29 Chris Robison
>>         <chris@... <mailto:chris@...>
>>         <mailto:chris@...
>>         <mailto:chris@...>>>: >   >> >> What is requi...
>>
>>         >> >> __ distcc mailing list          
>>          http://distcc.samba.org/ To unsubscribe or change options: ...
>>
>> __ distcc mailing list            http://distcc.samba.org/
>>
>> To unsubscribe or change options:
>> https://lists.samba.org/mailman/listinfo/distcc
>>

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

Parent Message unknown Re: getting distcc to compile without localhost

by Fergus Henderson-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Probably yes... I don't know how portage is invoked, but if it is via a shell command, then try inserting "pump" in front of that shell command, e.g. "pump portage ...".  You will also need to either set DISTCC_POTENTIAL_HOSTS, or to append ",lzo,cpp" to each host in DISTCC_HOSTS or /etc/distcc/hosts.

--
Fergus Henderson <fergus@...>

On May 29, 2009 11:10 AM, "Chris Robison" <chris@...> wrote:

Gentoo currently installs and uses distcc 3.1.

Portage invokes distcc itself, when "distcc" is included in the "FEATURES" variable in /etc/make.conf (the file that configures the process of building packages).  Since I'm not calling distcc (or make or gcc) myself but rather it's being called by the framework, I'm curious as to whether I can follow this advice about pump mode with Gentoo.

 --chris



Fergus Henderson wrote:

> > > If gentoo is still using the vintage distcc 2.x, then pump mode isn't supported - you would ne...

> Fergus Henderson <fergus@... <mailto:fergus@...>> >

>> On May 29, 2009 9:46 AM, "Chris Robison" <chris@... <mailto:chris@...>>...

   <mailto:fergus@... <mailto:fergus@...>>>

>> >>        >> On May 29, 2009 2:21 AM, "Chris Robison" >>        <chris@... <mailto:...

       <mailto:chris@...

>>        <mailto:chris@...>>>... >> >>        distcc[19451] compile libxslt.c on 192....

       <http://192.168.0.10/10> <http://192.168.0.10/10> completed ok

>> >>        >> >> Different line, same filename. So, I don't think I'll >>        continue this th...

       <mailto:chris@...

>>        <mailto:chris@...>>>: >   >> >> What is requi... >> >>        >> >> __ distc...

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


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

Re: getting distcc to compile without localhost

by Chris Robison :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Many thanks -- that's it exactly.

Gentoo's package build/install utility is called "emerge",  and I have
found confirmation that "pump emerge packagename" works as you describe,
after the modification to /etc/distcc/hosts.

  --chris



Fergus Henderson wrote:

>
> Probably yes... I don't know how portage is invoked, but if it is via
> a shell command, then try inserting "pump" in front of that shell
> command, e.g. "pump portage ...".  You will also need to either set
> DISTCC_POTENTIAL_HOSTS, or to append ",lzo,cpp" to each host in
> DISTCC_HOSTS or /etc/distcc/hosts.
>
> --
> Fergus Henderson <fergus@... <mailto:fergus@...>>
>
>> On May 29, 2009 11:10 AM, "Chris Robison" <chris@...
>> <mailto:chris@...>> wrote:
>>
>> Gentoo currently installs and uses distcc 3.1.
>>
>> Portage invokes distcc itself, when "distcc" is included in the
>> "FEATURES" variable in /etc/make.conf (the file that configures the
>> process of building packages).  Since I'm not calling distcc (or make
>> or gcc) myself but rather it's being called by the framework, I'm
>> curious as to whether I can follow this advice about pump mode with
>> Gentoo.
>>
>>  --chris
>>
>>
>>
>> Fergus Henderson wrote:
>>
>>     > > > If gentoo is still using the vintage distcc 2.x, then pump
>>     mode isn't supported - you would ne...
>>
>>     > Fergus Henderson <fergus@... <mailto:fergus@...>
>>     <mailto:fergus@... <mailto:fergus@...>>> >
>>
>>         >> On May 29, 2009 9:46 AM, "Chris Robison"
>>         <chris@... <mailto:chris@...>
>>         <mailto:chris@...
>>         <mailto:chris@...>>>...
>>
>>            <mailto:fergus@... <mailto:fergus@...>
>>         <mailto:fergus@... <mailto:fergus@...>>>>
>>
>>         >> >>        >> On May 29, 2009 2:21 AM, "Chris Robison" >>  
>>              <chris@... <mailto:chris@...>
>>         <mailto:...
>>
>>                <mailto:chris@...
>>         <mailto:chris@...>
>>
>>         >>        <mailto:chris@...
>>         <mailto:chris@...>>>>... >> >>      
>>          distcc[19451] compile libxslt.c on 192....
>>
>>                <http://192.168.0.10/10> <http://192.168.0.10/10>
>>         completed ok
>>
>>         >> >>        >> >> Different line, same filename. So, I don't
>>         think I'll >>        continue this th...
>>
>>                <mailto:chris@...
>>         <mailto:chris@...>
>>
>>         >>        <mailto:chris@...
>>         <mailto:chris@...>>>>: >   >> >> What is
>>         requi... >> >>        >> >> __ distc...
>>
>> __ distcc mailing list            http://distcc.samba.org/ To
>> unsubscribe or change options: https:...
>>

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