Export (0) Print
Expand All

Change Cache Settings for an Application-Tier Server

You can help increase or balance performance in your deployment of Team Foundation by changing the settings of the cache for files that are under version control on the application-tier server. By default, this cache is enabled so that users can download files more quickly from the cache instead of directly from the database. As an administrator for Team Foundation, you can change the settings of this cache any time after installation.

NoteNote

You can also increase performance by enabling the cache on Team Foundation Server Proxy if you installed it. For more information, see Managing Team Foundation Server Proxy.

You can change the following settings:

You can perform these tasks by editing the web.config file for version control, which is located in the installation directory on the application-tier server.

NoteNote

By default, the installation directory for the application tier is %programfiles%\Microsoft Team Foundation Server 2010\Application Tier\Web Services.

Required Permissions

To perform these procedures, you must be a member of the Administrators security group on the application-tier server for Team Foundation.

In addition to these permissions, you might need to address the following requirements on a computer that is running Windows Server 2008, Windows Vista, or Windows 7:

  • To follow a command-line procedure, you might need to open an elevated Command Prompt by choosing Start, opening the shortcut menu for Command Prompt, and then choosing Run as Administrator.

  • To follow a procedure that requires Internet Explorer, you might need to start it as an administrator by choosing Start, choosing All Programs, opening the shortcut menu for Internet Explorer, and then choosing Run as administrator.

  • To edit web.config files, you might need to start the text editor as an administrator by choosing Start, choosing All Programs, opening the shortcut menu for the editor, and then choosing Run as administrator.

For more information, see the Microsoft website.

To specify a different cache root folder

  1. On the application-tier server, create a cache folder.

    You can create the folder on a local disk, in the UNC path, or on a mounted drive. For example, you might create the following folder:

    d:\temp\cacheroot

    Security noteSecurity Note

    The cache folder stores sensitive information that is not encrypted. Therefore, you should make sure that only the service account for the application tier (TFSService) has Modify permissions to this folder.

  2. Open the shortcut menu for the folder, and then choose Properties.

    The Properties dialog box for the folder opens.

  3. On the Security tab, choose Edit.

    The Permissions dialog box opens.

  4. Choose Add.

    The Select Users, Computers, or Groups dialog box opens.

  5. Add the local group TFS_APPTIER_SERVICE_WPG, and then choose OK.

  6. Select both the Read and Write check boxes, clear all other check boxes, and then choose OK.

  7. In Windows Explorer, browse to %programfiles%\Microsoft Team Foundation Server 2010\Application Tier\Web Services.

  8. Open the web.config file in a text or XML editor, and then locate the <appSettings> section.

  9. Add a line to the appSettings section to point to the folder that you just created:

    <add key="dataDirectory" value="NewCacheRootFolderLocation" />
    

    For example, you would add the following line if you created a cache root folder that is named cacheroot in the temp directory of a hard drive, as in the earlier example:

    <add key="dataDirectory" value="d:\temp\cacheroot" />
    
  10. Save and close the web.config file.

    NoteNote

    To maximize performance, copy the files from the old cache folder to the new cache folder.

  11. Open a Command Prompt window, type iisreset, and then press ENTER.

  12. Delete the old cache root folder.

    NoteNote

    By default, the cache root folder is located at %programfiles%\Microsoft Team Foundation Server 2010\Version Control Proxy\Web Services\VersionControlProxy\Data.

You can change the maximum limit on the amount of storage space that the application-tier server can use for caching files. When this limit is reached, a cleanup routine makes room for newly requested files by deleting those files that have not been accessed in the longest time.

To change the limit at which old files are removed from the cache

  1. On the application-tier server, open Windows Explorer, and browse to \%programfiles%\Microsoft Team Foundation Server 2010\Application Tier\Web Services.

  2. Open the web.config file in a text or XML editor, and then locate the <appSettings> element.

  3. Add one of the following elements:

    • To specify a percentage of available disk space to fill before old files are removed, add the PercentageBasedPolicy element. You must specify a whole number as the value of this element.

      For example, the following line specifies that the cache should fill up to 60% capacity of available disk space before old files are removed:

      <add key="PercentageBasedPolicy" value="60" />
      
    • To specify a fixed size in MB for the cache to reach before old files are removed, add the FixedSizeBasedPolicy element. You must specify a whole number as the value of this element.

      For example, the following line specifies that the cache should reach 500 MB before old files are removed:

      <add key="FixedSizeBasedPolicy" value="500" />
      
      NoteNote

      If both the FixedSizeBasedPolicy and PercentageBasedPolicy elements are specified, the value of the FixedSizeBasedPolicy element is used, and the value of the PercentageBasedPolicy element is ignored.

  4. Save and close the web.config file.

  5. Open a Command Prompt window, type iisreset, and then press ENTER.

To change the amount of cache to free when removing old files

  1. On the application-tier server, open Windows Explorer, and browse to %programfiles%\Microsoft Team Foundation Server 2010\Application Tier\Web Services\.

  2. Open the web.config file in a text or XML editor, locate the <appSettings> element, and then add the CacheDeletionPercent element.

    For example, the following line specifies to free 50% of the cache when removing old files:

    <add key="CacheDeletionPercent" value="50" />
    
  3. Save and close the web.config file.

  4. Open a Command Prompt window, type iisreset, and then press ENTER.

Community Additions

ADD
Show:
© 2014 Microsoft