PDA

View Full Version : distccd and ummm.... its neato?



fryfrog
10-23-2003, 08:59 PM
I don't know if many of you have played with distcc, but I just stumbled on it while I was reading the gentoo forums... so I thought I would give it a try. I have 3 linux computers on my network (4 if you count the firewall w/o gcc). 2x Gentoo and 1x Mandrake 9.0.

None of them tend to compile at the same time so I thought I would give it a try. Gentoo itself has decent distcc integration. It is a source based distro so any upgrade or new installation can take a while... harnasing 2 other computers would be super cool.

Well, it works quite well. GCC on the computers needs to be the same version (or very close?). MDK has 3.2.2 and gentoo has 3.2.3 I think. Showeq went from compiling in about 15min to 7min using it.

Anyway, I liked it and I thought maybe some of you would like it too :)

S_B_R
10-28-2003, 01:01 PM
Ok, I tried this out, after a couple false starts, I seem to have working SEQ Binary. Here's couple questions I have: What steps did you take to get SEQ to configure and compile? I eventually set CC=distcc and CXX="distcc g++" with those ./configure and make complete successfully. Have you compiled the same source more than once? and if so have you tired varying number s of distcc servers? and if so is the binary the same each time? Mine are different.

I did some test compiles Test 1 was with just the normal gcc as usual. Test 2 was with distcc using 2 machines (localhost and machine2). Test 3 was with distcc using 3 machines (localhost, machine2 and machine3). Each time the resulting binary had a different filesize than the one preceeding it. All 3 systems are running Redhat9, all have the same version of gcc and distcc (and distccd). Localhost is a 600MHz Coppermine Celeron, machine2 is a 2.5GHz P4, and machine3 is a 1GHz P3.
Test 1: -rwxr-xr-x 1 root root 14812496 Oct 27 23:33 /staging/test1/showeq
Test 2: -rwxr-xr-x 1 root root 14812368 Oct 27 23:54 /staging/test2/showeq
Test 3: -rwxr-xr-x 1 root root 14812360 Oct 28 00:41 /staging/test3/showeqAll the binaries appear to work. I didn't have time to thuroughly test them for any real length of time though. Maybe there is a simple reason why this happens, I don't know as much as I would like to about compilers in general so it could be normal behavior....

Anyway the long and short of it, my compile times were as follows:
Test 1: 23m8s
Test 2: 9m26s
Test 3: 8m13s (machine3 had other load and only had about 60% cpu available for the compile.)

fryfrog
10-28-2003, 11:26 PM
To tell you the truth, gentoo pretty much set everything up for me. I will run a couple of tests tonight and see what happens. I think basically what I did was put the path to distcc ahead of gcc. From my understanding of how it works, if you use "make" it will just use your normal system gcc, but when you use make -jX (where X is above the number of cpus maybe?) it will send it to other hosts. Here comes some testing.

fryfrog
10-29-2003, 12:08 AM
Run 1: Make on remote system, duron 700mhz


-rwxr-xr-x 1 root root 7268709 Oct 29 00:54 src/showeq
real 14m2.837s
user 1m5.365s
sys 0m10.115s


Run 2: Make on remote and local system, both run identical gentoo.


-rwxr-xr-x 1 root root 7268709 Oct 29 01:07 src/showeq
real 9m8.663s
user 1m6.475s
sys 0m10.435s


Run 3: Make on 2 remotes and local, one remote is manrake 9.0 with a slightly different version of gcc.



-rwxr-xr-x 1 root root 9462089 Oct 29 01:16 src/showeq
real 7m23.158s
user 1m7.815s
sys 0m10.610s