1 |
Michael Sullivan writes: |
2 |
|
3 |
> > It's all explained here : http://www.gentoo.org/doc/en/distcc.xml |
4 |
> |
5 |
> I read the guide when I first set up distcc, but it didn't provide |
6 |
> enough detail for me to understand. I have two computers, a slow one |
7 |
> and a fast one. I would like the fast one to assist the slow one. The |
8 |
> fast machine's IP is 192.168.1.2, and the slow is 192.168.1.4. On the |
9 |
> fast one, I'm running /etc/init.d/distccd and it's /etc/conf.d/distccd |
10 |
> looks like this: |
11 |
|
12 |
[...] |
13 |
> # Logging |
14 |
> # You can change some logging options here: |
15 |
> # --log-file FILE |
16 |
> # --log-level LEVEL [critical,error,warning, notice, info, debug] |
17 |
> # |
18 |
> # Leaving --log-file blank will log to syslog |
19 |
> # example: --log-file /dev/null --log-level warning |
20 |
> # example: --log-level critical |
21 |
> |
22 |
> DISTCCD_OPTS="${DISTCCD_OPTS} --log-level critical" |
23 |
|
24 |
Until all is running fine, I suggest setting this to info or debug instead. |
25 |
|
26 |
> DISTCCD_OPTS="${DISTCCD_OPTS} --allow 192.168.1.0/24" |
27 |
|
28 |
Yup. |
29 |
|
30 |
> The slow machine is also running /etc/init.d/distccd. |
31 |
|
32 |
That does no harm, but is not necessary unless you also want the slow |
33 |
machine to help the fast one. |
34 |
|
35 |
> Is this right? |
36 |
|
37 |
Looks good to me. |
38 |
|
39 |
Did you activate distcc on the slow client with 'distcc-config --set-hosts |
40 |
192.168.1.2'? This tells that all compilations should be done on the fast |
41 |
machine. If you like the slow machine to also do some of the work, the |
42 |
command could look like this: 'distcc-config --set-hosts "192.168.1.2 |
43 |
192.168.1.4/1"', meaning that the slow one does one compilation at the time, |
44 |
while for the fast one there is no limit. |
45 |
Adjust your MAKEOPTS in /etc/make.conf to something like the total number of |
46 |
cores plus one. And be sure you have distcc in your FEATURES. |
47 |
|
48 |
Emerge something, and watch for "failed to distribute, compiling locally |
49 |
instead" error messages in the emerge output. If there are none, distcc |
50 |
seems to work. |
51 |
And watch syslog on the fast machine, it should look like this (with log- |
52 |
level set to notice): |
53 |
|
54 |
Oct 17 15:30:43 [distccd] (dcc_job_summary) client: 192.168.2.35:38681 |
55 |
COMPILE_OK exit:0 sig:0 core:0 ret:0 time:1295ms x86_64-pc-linux-gnu-gcc |
56 |
/var/tmp/ccache/sbc_primit.tmp.tanja.26261.i |
57 |
|
58 |
Wonko |