提交 46732fae 编写于 作者: N Nicolas Pitre 提交者: Junio C Hamano

change the unpack limit treshold to a saner value

Currently the treshold is 5000.  The likelihood of this value to ever be
crossed for a single push is really small making it not really useful.

The optimal treshold for a pure space saving on a filesystem with 4kb
blocks is 3.  However this is likely to create many small packs
concentrating a large number of files in a single directory compared to
the same objects which are spread over 256 directories when loose.  This
means we would need 512 objects per pack on average to approximagte the
same directory cost (a pack has 2 files because of the index).

But 512 is a really high value just like 5000 since most pushes are
unlikely to have that many objects.  So let's try with a value of 100
which should have a good balance between small pushes going to be
exploded into loose objects and large pushes kept as whole packs.

This is not a replacement for periodic repacks of course.
Signed-off-by: NNicolas Pitre <nico@cam.org>
Signed-off-by: NJunio C Hamano <junkio@cox.net>
上级 cd976f5c
......@@ -11,7 +11,7 @@
static const char receive_pack_usage[] = "git-receive-pack <git-dir>";
static int deny_non_fast_forwards = 0;
static int unpack_limit = 5000;
static int unpack_limit = 100;
static int report_status;
static char capabilities[] = " report-status delete-refs ";
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册