Git push is slow

It takes quite some time (more than 3 minutes) for the “remote: Counting objects: …” to slowly count up to 757262 .

% git push origin HEAD:refs/for/master
Enumerating objects: 19, done.
Counting objects: 100% (19/19), done.
Delta compression using up to 10 threads
Compressing objects: 100% (11/11), done.
Writing objects: 100% (11/11), 2.05 KiB | 300.00 KiB/s, done.
Total 11 (delta 8), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (8/8)
remote: Counting objects: 48204

This old discussion on Google Groups suggests running git gc or gerrit gc on the server regularly. Is it something still necessary, and do we do it? Or is it our repo just too big to be fast?

Gerrit has been intermittently slow for the past few weeks. Restarting it seems to fix the problem for a short time, and then it comes back. I haven’t checked web server load, so it could be just under heavy load, or maybe we do need to run a git gc…

I cleared the cache and ran a gerrit gc. Things seem to be better now.

4 Likes