次の方法で共有


Improving Build Performance in TFS 2008

There are a number of things you can do to improve build performance in TFS 2008:

  • Reduce the scope of the Get as much as possible by fine-tuning the workspace mapping.
  • Reduce the verbosity of the MSBulid logger (defaults to “diagnostic” in .NET 3.5) by adding the following to your TfsBuild.rsp file: “/flp:verbosity=normal”.
  • Review these tips on speeding up large builds from Channel9.
  • Set the IncrementalGet property to True in TFSBuild.proj if you’re OK with re-using sources across builds.
  • Set the IncrementalBuild property to True if you’re OK with re-using outputs across builds.
  • Turn on MSBuild multiproc support to get parallelization of solution builds – works best on Build Agents with multi-core processors.
  • Install SP1 and the TargetsNotLogged Hotfix on your Build Agents to reduce noise in the build logs.
  • If you’re using a TFS proxy, configure your Build Agent to use it too by following this post (but substituting 9.0 for 8.0):
  • Consider partitioning the build process into multiple build definitions, e.g. (a) an incremental continuous integration build that just validates the latest changeset without copying a drop, and (b) a clean nightly build that builds that same label as the last good CI build and runs a suite of automated tests.
  • Schedule disk defragmentation on your build agents – if you do continuous integration and nightly builds, it might be best to schedule defragmentation for the weekend.
  • Use build machines with fast hard drives – upgrading to a newer, faster hard drive is a relatively cheap way to improve build performance. The performance of WD’s 750 GB 7200 RPM drive is very close to the fastest mechanical hard drives available at less than $100.
  • Use a Server (not a Workstation) OS to host the drop folders – e.g. Windows Server 2003 rather than XP.

Have any good tips on improving build performance? Please share them by posting a comment here.

Update: William Bartholomew has a two great posts on build performance: Monitoring Build Performance and Drilling into Build Performance – March 19, 2009.