Slashdot Mirror


Optimizing distcc

IceFox writes "Having fallen in love with distcc and its ability to speed up compiling (insert anyone who compiles like Gentoo users or Linux developers). I recently got the chance to dive deeper into distcc. By itself distcc will decrease your build times, but did you know that if you tweak a few things you can get a whole lot better compile times? Through a lot of trial and error, tips from others, profiling, testing and just playing around with distcc, I have put together a nice big article. It shows how developers can get a bigger bang for their buck out of their old computers and distcc with just a few changes."

10 of 201 comments (clear)

  1. Distccd for cygwin by aberant · · Score: 5, Informative

    My life changed the day i found out i could get my super fast P4 Windows XP box to compile for my slow linux box. Distcc for cygwin is a miracle. check out the thread at Gentoo forums

  2. Martin Pool interview by Wise+Dragon · · Score: 5, Informative

    Martin Pool, the brains behind distcc, was interviewed by ZDNet yesterday. How timely.

    http://web.zdnet.com.au/builder/program/work/sto ry /0,2000034960,20283318-1,00.htm

  3. Mirror by Rufus211 · · Score: 4, Informative

    I feel like burning my new site in a bit =)

    http://hackish.org/~rufus/distcc.php.html

  4. Re:Martin Pool interview - clickable link by Poisonous+Drool · · Score: 4, Informative
  5. Or... You could do it properly. by Moderation+abuser · · Score: 4, Informative

    Install Sun Grid Engine[1] since it's free and now open source and then not only do you get qmake for distributed builds but you also get a general purpose distributed processing system. And hey! It even has the current buzzword "grid" in the title so your PHB will love you.

    [1] http://gridengine.sunsource.net/

    --
    Government of the people, by corporate executives, for corporate profits.
  6. Why wasn't a factorial experiment used? by alptraum · · Score: 4, Informative

    Sigh, another experiment that could have benefitted greatly from factorial experimentation. If your unfamiliar with DOE, here is a basic introduction courtesy of NIST:

    http://www.itl.nist.gov/div898/handbook/pri/sect io n1/pri11.htm

    It appears in this case we have a variety of factors and trying to, in this case, have a response of "elapsed time" for compilation and it is a minimization problem. Instead of looking at factors individually, a factorial DOE would have allowed interactions to be analyzed and to look for a global optima rather than just optimizing individual factors and then tossing them all together, it doesn't work that way a lot/most of the time.

    If the author of this article is present: Why wasn't a factorial experiment used?

  7. Re:Gentoo Impact(s) by y2dt · · Score: 5, Informative

    official gentoo distcc guide:
    http://www.gentoo.org/doc/en/distcc.xml

  8. Re:behind the XCode curtain by Anonymous Coward · · Score: 5, Informative

    Yup, look at the X code preferences for distributed builds. The cool part is they use Rendezvous to automatically find machines to send work. You can set your box to use these others and/or offer service to others. Also on dual processor boxes is will treat them as two machines and do two compiles at once.

    Anyway, you can see distcc running when you have X code enabled for distributed builds and running.

    --jim

  9. Missed the best point by MerlynEmrys67 · · Score: 4, Informative
    He completely ignored the usage of distcc and ccache together. The pair of applications make for a huge win.

    There are some problems though - which do you do first ccache or distcc (answer on my benchmarks is ccache - if it isn't in the cache send it on the network) how fast is your "build" machine - this is critical. The build machine is resonsible for preprocessing the file, checking if it is in the cache and then sending it out to be turned into an object. Especially when you interact the results of ccache (which most of your builds are just the same file over and over - very few "changed" files) and distcc - most of your time is spent in the first pass compiler.

    In our environment we had boatloads of dual XEON machines around - they made wonderful build machines, and it didn't hurt that we connected them with Gig Ethernet either. Did wonders for our build times.

    Over all distcc and ccache are wonderful tools that should be in every large compile environment - making compiles that used to take days take simple minutes. But you want to make sure that the dependancy between ccache and distcc work optimally in your environment.

    --
    I have mod points and I am not afraid to use them
  10. Recursive Make Considered Harmful by JWhitlock · · Score: 5, Informative
    There was an interesting paper by Peter Miller in 1997 called "Recursive Make Considered Harmful". It makes a good case for why recursive make is a bad idea, slowing down compile times and clouding dependancies. Benjamin Meyer has proved the point again, with his use of unsermake - if you generate a non-recursive make, then distributed compiles are twice as fast.

    Unfortunately, the makefile creator most people use, automake, creates only recursive makefiles. Maybe a replacement like unsermake will get automake developers thinking about radical changes. I wouldn't mind seeing M4 go away, for one.