How many users are not using a TFS Proxy server?
When you do a "Get Latest" in TFS, there are three requests that the server processes:
- The initial Get() - the server calculates what files are out-of-date in your workspace
- A Download() for any files that are out-of-date in your workspace
- The final UpdateLocalVersions() - the client informs the server what versions of what files it has in it's local workspace
In the second step, if there are a large number of requests for file downloads it can place quite a lot of load on your TFS Application Tier. If you have a large number of users or build servers that download files in your environment, you may benefit from setting up a Team Foundation Server Source Control Proxy on a separate machine. Since the proxy is state-less, you could even place multiple machines behind a load balancer (we use this internally for our build labs with good results).
Once you have the proxy set up, you might want to know who isn't using it. This can be done easily by querying the TfsActivityLogging database. This logging is enabled by default in TFS 2008. In TFS 2005 you will have to enable the commandLogging flag in the Global Web.Config file (and the query below will be a little different).
In our environment, we know that all proxy servers run as NETWORK SERVICE, so we can filter out non-proxy requests easily by excluding machine accounts (DOMAIN\COMPUTERNAME$)
SELECT
SUM([ExecutionCount]) as DownloadCount, [IdentityName], [IPAddress]
FROM [TfsActivityLogging].[dbo].[tbl_Command]
WITH (NOLOCK)
WHERE Command = 'Download'
AND IdentityName NOT LIKE '%$'
GROUP BY IPAddress, IdentityName
ORDER BY SUM([ExecutionCount]) DESC
If everybody is using a proxy server, the only requests in the TFS Activity Log you should see are requests from a proxy server itself. Every other request will either be:
- User without a proxy server configured
- User with a proxy server configured, but the proxy was unavailable, so it failed over to going to direct to AT.