Thursday, December 3, 2009

distcc - Compiling With Multiple Machines

For our final lab for the semester, we are required to compile a program with a program called distcc.

This program allows us to distribute the task of compiling packages to multiple machines so that we can reduce compiling time, compared to compiling packages on one machine.

To start, I picked the machine Australia as my client machine, which will run the rpmbuild command. And I chose Scotland, HongKong, and Germany as my servers, they will be the machines I will distributing my work to.

I followed the instructions that my professor posted up: Link which really helped a lot.

To see if the server boxes are helping me compile my package, which I choose abiword.
I sshed into them and typed in the command top which displays all the tasks going on in real time. So far everything was working fine, till I noticed that Scotland was not receiving any work.

The way you can tell if ditcc is working on all machines is check for either an instance of cc1, distccd, or ccplus



So instead of stopping and rebuilding, I let it finish to see how long it took to compile with 3 machines. The J value I set up for this build was 15. You can read back to my previous blog about what the J value does: Link
The time it took to compile the package with 3 computer is 7 mins 43.183 s


After the completion, I edited the J value this time to 25 and ran the rpmbuild command again.
This time, I noticed that all 4 machines are now compiling as you can see in my next screen shot.



Below is the final screen shot of the final compiling time.
The time it took this time to compile with 4 machines is 5 min 47.615s


As you can see, the more machines you have distruted with your work the faster it gets. As my professor Chris Tyler mentioned they use distcc to compile Fedora

0 comments:

Post a Comment