尝试重新包装git回购以提高性能后出现问题 [英] Issues after trying to repack a git repo for improved performance

查看:85
本文介绍了尝试重新包装git回购以提高性能后出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

前一段时间,我发布了一个问题,要求对计划进行反馈,以修复由于大量二进制文件而导致执行速度缓慢的回购协议。这个问题(这不是一个必读的):修复由于大的二进制文件而变慢的git repo



我遵循我的计划,并且经历了意想不到的一面结果。



我们的回购新鲜克隆原本需要2-3个小时。发现服务器开始交换,并且在完成 git config pack.windowMemory 100m&& git config pack.packSizeLimit 200m ,克隆时间下降到〜15分钟。



我想我仍然会执行我计划的其余部分,所以我禁用了我们所使用的二进制类型的delta压缩器,并在repo上运行了 git repack -a -d -F



之后,回购的新鲜克隆需要大约20分钟,所以它实际上变得更糟。但真正的问题是,每当有人已经克隆回购试图推送提交时,他们会得到自动打包存储库以获得最佳性能。



什么可能会出现问题,以及它可以/应该如何解决? 可能是您的回购的大小和您的低价值对于 pack.packSizeLimit 使得包数始终高于 gc.autopacklimit 。因此,增加其中的任何一个以确保gc不会运行每次提交。



我不确定 packSizeLimit 会影响记忆,但我不认为这会有什么重大影响。如果您的实验显示其他情况,请纠正我。直接影响内存使用的参数是 pack.windowMemory pack.deltaCacheSize


A while ago I posted a question asking for feedback on a plan to fix a repo that was slow because of a lot of big, binary files. That question (not a must-read for this one): Fixing up a git repo that is slowed because of big binary files

I followed through with my plan, and experienced unexpected side results.

A fresh clone of our repo originally took 2-3 hours. Figured out that the server started swapping, and after doing git config pack.windowMemory 100m && git config pack.packSizeLimit 200m, the clone time sank to ~15 minutes.

I figured I'd still do the rest of my plan, so I disabled delta compresson for the binary types we have, and ran git repack -a -d -F on the repo.

After this, a fresh clone of the repo takes ~20 minutes, so it actually got worse. But the real problem is that every time someone that had already cloned the repo tries to push commits they get "Auto packing the repository for optimum performance.".

Any ideas on what might have gone wrong, and how it can/should be fixed?

解决方案

Probably the size of your repo and your low value for pack.packSizeLimit makes the number of packs always be above gc.autopacklimit. So increase either of them to make sure the gc doesn't run each commit.

I'm not sure in what ways packSizeLimit would affect memory, but I don't believe it would have any significant effect. Please correct me if your experiments show otherwise. The parameters that directly affect memory use are pack.windowMemory and pack.deltaCacheSize.

这篇关于尝试重新包装git回购以提高性能后出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆