Git clone from Stash is slow


We are evaluating Stash. We have Stash installed in a VMWare environment on a Windows 2008 R2 64-bit server with 6gb memory and plenty of CPU. We are also running it on a MySQL database.

The Stash server has only on Repository and it's size is 1.26gb and only one active user.

When we do a git clone from the server it takes ages e.g minuttes before the download of the sourcecode begins. We can see on the server that the git.exe process is launced just when we hit git clone and it's memory consumption is hitting 600mb with a CPU usage of 50% and after a while the CPU drops to 0% the git clone has not gotten anywhere. It has not got to the point where it actually downloads anything. It just hangs and waits and we don't understand what it's waiting for. Actually it takes 13minuttes before the actual "Receiving objects" echoes progress. In total the clone operation took 20minuttes. What could be the reason for this performance ? Is this normal performance expected from Stash/Git ?

Cosidering this document "receiving objects" on the client side should start after the compression of the pack is done and we consider the packing to be done when the CPU hits 0%.


3 answers

Hi Donnib,

Before going any furter, I just need to double check you're not running Stash as an administrator user?

This is the highest cause of performance problems on Windows, although normally it's around push/merge.

If that's not the issue, perhaps the easiest thing to do will be to raise a support ticket and attach the support zip (in the Administration page). Before you do if you could enable profiling and run another clone that will tell more about what might be happening.




Thanks for replying. We run the Stash service as a "Local System accout" and not sure if this is an admin but i guess so ??

Hi Donnib,

Yeah Local System exhibits the same behaviour. Can you try running Stash as a local, non admin user? Let me know if that helps.

I should add that while it sounds like your instance is definitely not behaving in a correct manner, I wouldn't expect a 1.2GB clone to be especially quick. :( Unfortunately when you factor in the pack + clone it can take a minutes to come down the wire. We have a SCM cache which helps with the packing if none of the refs have changed.



I tried creating a local user which was a member of Users group but Stash would not start with that user. I can't see how Stash would work with such user since it's needs to create folders and such and i think it needs admin rights to do so. I tried to apply the KB fix mentioned the article above and that did not change anything. I have enabled Profiling and waiting to make a new clone to see the results.

I ran the profiler and i see following line :

[1204312ms] - C:\Users\XXXXXX\AppData\Local\Programs\Git\cmd\git.exe http-backend

That's 20min. So the problem lies here, why ? any idea ?

Hi Donnib,

Could you please raise a support issue at Our support engineers will need to have a close look at your log files in order to help you with this problem.

We'll post any general findings coming out of the support case here so that other people can benefit form it.



Suggest an answer

Log in or Sign up to answer
Community showcase
Published Mar 14, 2019 in Bitbucket Pipelines

Building a Bitbucket Pipe as a casual coder :  #!/bin/bash source "$(dirname "$0")/" enable_debug extra_args="" if [[ "${DEBUG}" == "true" ]]; then extra_args="--verbose" fi # mandatory variables R...

274 views 0 12
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you