We are experiencing a weird performance with git bitmaps which are generated using native git, we tried that using different options for repacking using git 2.1 and 2.2, we got almost double the clone time when git bitmaps are generated by native git compared to 30-40 % clone time reduction when using gerrit gc or jgit garbage collection.
For example for a repository without bitmaps, it take 11 mins to clone --bare this repository, when running gerrit/jgit gc, the clone for bare repository takes almost 7 mins as shown below:
$ time git clone --bare ssh://localhost:29418/repository-with-jgit-gc jgit-gc-repo
Cloning into bare repository 'jgit-gc-repo'...
remote: Counting objects: 2, done
remote: Finding sources: 100% (2/2)
remote: Total 799178 (delta 0), reused 799178 (delta 0)
Receiving objects: 100% (799178/799178), 647.80 MiB | 17.22 MiB/s, done.
Resolving deltas: 100% (546459/546459), done.
Checking connectivity... done.
real 7m10.464s
while when running git gc with the following options set to generate the bitmaps, also we used different repack/pack options and still the same degraded performance:
[pack]
writeBitmaps = true
the bare clone takes 21 mins as shown below:
$ time git clone --bare ssh://localhost:29418/repository-with-git-gc-bmp git-gc-bmp-repo
Cloning into bare repository 'git-gc-bmp-repo'...
remote: Counting objects: 705567, done
remote: Finding sources: 100% (799049/799049)
remote: Getting sizes: 100% (341606/341606)
remote: Compressing objects: 99% (7437047/7437111) =====> This step of the clone does not show in case of gerrit/jgit gc'ed repo.
remote: Total 799049 (delta 453104), reused 654973 (delta 423286)
Receiving objects: 100% (799049/799049), 880.10 MiB | 14.44 MiB/s, done.
Resolving deltas: 100% (500957/500957), done.
Checking connectivity... done.
real 21m12.827s
It looks to me that bitmaps generated by native git slows down the cloning of the repository, I came across an older discussion in the community [1] regarding slow clone time for repositories imported from file system.
Did anyone experience such performance degradation using native git bitmaps ? What options you use for your bitmaps generation using native git ?
I have an impression that this might be caused by this extra compression step in the clone. Does anyone know why the compression step is showing for the repository which has native git bitmaps, and not for those with gerrit gc ?
Thanks and Regards
Bassem Guendy