I've done some searching of the forums and open issues for this but couldn't find anything recent. We have a TC server with some thirty-odd projects on it and have three agents. All agents are configured identically as far as I can tell except for the ports. All run as services with the same user account on a Windows 2003 server. TeamCity itself is on a separate Windows 2003 server. As far as I can tell, the permissions are identical for each agent's folder.
The issue is that for two agents (the second two we set up), retrieving source takes a pretty long time. Sometimes hours. But on the first agent, it is fine. Usually takes a few minutes depending on the project. I've verified this happens for projects that use SVN as well as ones that use GIT.
For SVN, we have configured the projects to checkout automatically on the server and we don't use the default checkout directory. That is, we specify a directory for the agents to checkout to (D:\Builds\<projectName>). We do not have the option set to clean all files before a build. For Git, projects are configured to checkout on the agent and we don't specify a checkout directory for those. Again, we don't clean before we build.
We're using TeamCity 4.5.3 (build 9035). I notice there is a new version and I was about to install it to see if it will solve the issue. But I see this has happened to others so perhaps there is something else at play here?