Improving speed of checkout from git (from github)

5.3k Views Asked by At

I'm using git and TeamCity v6.0 in a Windows environment.

I have just switched over from server side checkouts to checkout on agents because of IO issues, however...

Initial checkout has become exceeding slow from ~ a minute to >45 minutes. Once the repo is cloned everything is OK. Is there some configuration on the agents I can tweak to improve this? Thanks for any replies in advance.

What I see is the initial git files created on the agent and then there is a very long pause and then I get all my data. I can see from the process explorer that git appears to be doing very little and there is no obvious source of throttling.

2

There are 2 best solutions below

8
On BEST ANSWER

One thing that can cause a slowdown is java ssh implementation used with agent-side checkout, to turn it off set an agent property teamcity.git.use.native.ssh=true.

Also you can set an agent property teamcity.git.use.local.mirrors=true, in this case TeamCity will create a bare clone of your repository and will update build directory from this bare clone instead of github, i.e. initial clone will be done only once.

5
On

If it's fast on another configuration, your problem is not git or github, but the size of the pipe running into the machine.

If you are using TeamCity in the cloud, you will need to talk to JetBrains about their bandwidth. If locally, talk to your sysadmins.