Tips for Improving Team Foundation Server Performance

The performance of Team Foundation Server can be affected by many factors, such as out-of-date software and settings for anti-virus software. Use this article to check for and change the most common factors that affect Visual Studio Team System 2008 Team Foundation Server performance.


This article is based in part on the following entry in the Developer Support Team Foundation Server blog on the Microsoft Web site: TFS Performance Tips & Tricks - Part One.

Step 1: Collect performance data for your servers

Team Foundation Server includes a set of performance counters that you can use to monitor the performance of your application-tier and data-tier servers for Team Foundation. For more information, see these topics on the Microsoft Web site: Monitoring Performance and How to: View Team Foundation Server Performance Counters.

Other tools you can use to collect performance data and diagnose issues:

Step 2: Install the most recent service packs for all software that relates to Team Foundation Server

Make sure that you have installed the most recent service packs releases for the editions of Visual Studio, SQL Server, and Team Foundation Server that you use. Consider the following information when you install service packs:

  • Visual Studio 2008 Service Pack 1 (SP1) requires you to install .NET Framework 3.5 SP1, which is not compatible with Windows SharePoint Services 2.0. After you install Visual Studio 2008 SP1, you must upgrade Windows SharePoint Services 2.0 to 3.0. For more information, see this topic on the Microsoft Web site: Upgrading Windows SharePoint Services 2.0 to 3.0 After Upgrading Team Foundation Server.
  • If you open Team Explorer on a server that is running Team Foundation Server or Team Foundation Build, you must install the service packs for Visual Studio on those computers also.

Step 3: Implement tips for improving performance

Check your anti-virus software settings.

The way in which anti-virus software scans Team Foundation Server can cause significant performance issues. Here are some tips:

  • Use background scanning, not real-time scanning, on the directories used by Team Foundation Server.
  • For virtual images of Windows Server with Team Foundation Server, run anti-virus software only on the image of the installed software and not on the .vhd or .vhc files for the host operating system. Running anti-virus software on the virtual hard disk can corrupt it.

Move the data-tier to its own dedicated server.

If you have a single-server or virtual-computer installation of Team Foundation Server, you can significantly increase performance by moving the data tier to a separate, dedicated server. For detailed instructions, see the following topics on the Microsoft Web site: How to: Restore Data for Team Foundation Server to a Different Server and How to: Move from a Single-Server to a Dual-Server Deployment.

Change the Team Foundation cache size and percentage of old files to delete from the application-tier server.

When the cache reaches the pre-defined size limit, Team Foundation Server recycles a part of the cache. A performance problem can occur when the total available size of the cache is smaller than a typical transaction from Team Foundation Server. By default, Team Foundation uses 10% of the available disk space for its cache and recycles 20% of its data when the cap is reached. This cache size and percentage ratio can cause performance problems.

For example, suppose a customer is running Team Foundation Server on a virtual machine that has only 10GB of free space. The customer also performs continuous builds of approximately 1GB. With 10GB of total free space, Team Foundation takes 1GB for its cache. When it becomes full, the oldest 200MB of content is removed. Therefore, the cache is constantly being cleared, which spikes the processor and significantly decreases performance. In addition, this scenario does not consider the load required by other users of the system.

For information about how to check the performance of your cache, see this topic on the Microsoft Web site: How to: Examine Cache Performance by Using the ProxyStatistics Web Service.

For information about how to increase your cache size, see this topic on the Microsoft Web site: How to: Change Cache Settings for an Application-Tier Server.

Configure Team Foundation to bypass the proxy server when on a local network.

If Team Foundation Server is on the local network, you do not need a proxy server to connect to it. Not using a proxy server gives a small performance improvement to Team Foundation Server.

You can bypass the proxy for local connections by adding BypassProxyOnLocal with the value TRUE to the following registry key:

In HKLM (global)--Software\Microsoft\VisualStudio\9.0\TeamFoundation\RequestSettings\BypassProxyOnLocal


Edit the registry at your own risk.

Additional Resources

You can find additional resources on the Microsoft Web site:


Developer Support Team Foundation Server: TFS Performance Tips & Tricks - Part Two

Granth's blog: Large Team Foundation Server Performance Characteristics

White papers

Team System Web Access 2008 Scalability Limits White Paper


Team Foundation Server - General

Team Foundation Server - Setup

Team Foundation Server - Administration