views:

100

answers:

3

We have a build machine running in our development department, which we've set up to build continuously throughout the working day. What this does is:

  • Deletes the source code previously checked out (5 minutes)
  • Does a clean checkout from subversion (15 minutes)
  • Builds a whole bunch of C++ and .NET code (35 minutes)
  • Builds installers and run unit tests (5 minutes)

Given the above, what sort of impact would adding different hardware have on improving the time it takes to do the above?

For example - I was thinking about using an SSD for the harddisk as compiling involves a lot of random disk access.

The subversion server is currently a virtual machine - would switching it to be a physical machine help the slow checkout?

What impact would upgrading from a Core 2 Duo processor to an i7 make?

Any other suggestions on speeding up the above?

+3  A: 

I think you've made good suggestions yourself. Definitely add a faster hard-drive (SSD or otherwise) and upgrade the CPU as well. I think your code repository (Subversion) should definitely be on a physical machine, ideally separate from your build machine. I think you'll notice a big difference after upgrading the hardware. Also, make sure the machine doesn't have any other large tasks running at the same time as the build tasks (e.g. virus scanning) so that the build tasks aren't slowed down.

How is your build machine setup to execute its tasks? Are you using continuous integration software? Is the machine itself a server or just a regular desktop machine?

Bernard
It's just a regular desktop machine. It's running MSBuild and executing a lot of custom build tasks in addition to building the solutions.
John Sibly
You definitely need to beef up that desktop machine. I would also suggest using a continuous integration server such as Hudson to automate these tasks. I have found it to be very useful.
Bernard
+1 for mentioning the virus scanners. On one occasion our build time dropped from 50 minutes to 2 minutes when virus scanner was disabled.
Roku
We've found that msbuild builds are *slower* with an SSD. We assume it's because of all the random writes the compiler makes to obj directories and such. You might want to consider a fast hard drive with a big on-disk cache, maybe even RAID.
Joe White
+2  A: 

One trick that might speed up the SVN checkout process could be to have a working copy on the build machine, update the working copy and do a svn export from the working copy to the build directory. This should reduce the load on the SVN server and reduce network traffic.

Another trick to reduce the first 5 minutes of cleaning could be to move the old build dir to a temp folder on the same disk and then use another background task to delete the old build dir when the main build completes (could be a nightly cleanup task).

Albin Sunnanbo
+1  A: 

Another way to speed up SVN is to use binary protocol instead of HTTP.

It looks like the build time is the most time consuming part - that's the best candidate for optimization. What about parallel build spread over other machines in the office - products like Incredibuild might significantly improve compilation time.

Eakraly