1 |
John Blinka wrote: |
2 |
> Hi, all, |
3 |
> |
4 |
> I run Gentoo on a very old 150 mhz pentium laptop. As you can imagine, |
5 |
> it's painful to update Gentoo packages on it. I've been attempting |
6 |
> to use distcc and crossdev so that the more more modern i686 machines on my |
7 |
> local network can do most of the compiling for this i586 box. However, |
8 |
> I haven't been very successful in offloading its compilations to the faster |
9 |
> boxes: distcc still seems to want to do most of the compiling on the |
10 |
> slow box |
11 |
> and only occasionally sends a compilation to one of the faster boxes. |
12 |
> |
13 |
> My reading of the docs suggests that the /etc/distcc/hosts file controls how |
14 |
> the work is distributed and MAKEOPTS in /etc/host controls how much |
15 |
> parallelism |
16 |
> is attempted. My setup on the slow box is MAKEOPTS="-j5" with |
17 |
> /etc/distcc/hosts |
18 |
> containing a line like |
19 |
> |
20 |
> fast_box_1/2 fast_box_2/2 localhost/1 |
21 |
> |
22 |
> My intention is that make will attempt 5 way parallelism, and that |
23 |
> distcc will |
24 |
> parcel out the 1st two tasks to fast_box_1, the next 2 tasks to fast_box_2, |
25 |
> and the last task to localhost, the slow box. |
26 |
> |
27 |
> But, as I watch compilations progress on all 3 machines, I see most of |
28 |
> the work |
29 |
> being done, on the slow box - typically 2 or 3 compilations |
30 |
> simultaneously, and |
31 |
> only an occasional compilation on the faster machines. |
32 |
> |
33 |
> How do I convince distcc on the slow machine to send more work - all of |
34 |
> it if |
35 |
> possible - to the fast machines? |
36 |
> |
37 |
> Thanks for your help. |
38 |
> |
39 |
> John Blinka |
40 |
> |
41 |
I'll try to put it all together: |
42 |
|
43 |
1) Edit /etc/distcc/hosts on all machines and insert the values you |
44 |
want. Your config seems correct |
45 |
3) FEATURES="distcc" |
46 |
4) put MAKE_OPTS="jx" on each machine, where x is the number of jobs |
47 |
distccd should accept for that machine. |
48 |
5) Check /etc/conf.s/distcc on each machine - "LISTEN" and "ALLOW" are |
49 |
vital, and there is again the flag "-j" set it equal to the j from |
50 |
MAKE_OPTS. example: |
51 |
|
52 |
DISTCCD_EXEC="/usr/bin/distccd" |
53 |
DISTCCD_PIDFILE="/var/run/distccd/distccd.pid" |
54 |
DISTCCD_OPTS="${DISTCCD_OPTS} --port 3632" |
55 |
DISTCCD_OPTS="${DISTCCD_OPTS} --log-level critical" |
56 |
DISTCCD_OPTS="${DISTCCD_OPTS} --allow 10.0.1.0/24 -j 6" |
57 |
DISTCCD_OPTS="${DISTCCD_OPTS} --listen 10.0.1.10" |
58 |
DISTCCD_NICE="19" |
59 |
|
60 |
|
61 |
Last: restart the daemon at each machine with "/etc/init.d/distccd |
62 |
restart" and you should be fine. |
63 |
|
64 |
To checkout if the number of listening distcc daemons is correct: "ps |
65 |
ufax | tr -s ' ' | grep distcc" |
66 |
|
67 |
|
68 |
|
69 |
-- |
70 |
Best regards, |
71 |
Daniel |
72 |
|
73 |
|
74 |
-- |
75 |
gentoo-user@g.o mailing list |