git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nicolas Pitre <nico@cam.org>
To: Junio C Hamano <junkio@cox.net>
Cc: git@vger.kernel.org
Subject: [PATCH take 2] change the unpack limit treshold to a saner value
Date: Wed, 06 Dec 2006 23:01:00 -0500 (EST)	[thread overview]
Message-ID: <Pine.LNX.4.64.0612062244090.2630@xanadu.home> (raw)
In-Reply-To: <Pine.LNX.4.64.0612061420410.2630@xanadu.home>

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: Nicolas Pitre <nico@cam.org>

---

diff --git a/receive-pack.c b/receive-pack.c
index d62ed5b..9140312 100644
--- a/receive-pack.c
+++ b/receive-pack.c
@@ -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;
 

  parent reply	other threads:[~2006-12-07  4:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-06 21:08 [PATCH] change the unpack limit treshold to a saner value Nicolas Pitre
2006-12-06 22:24 ` [PATCH] change the unpack limit threshold " Junio C Hamano
2006-12-07  0:19   ` Nicolas Pitre
2006-12-07  1:08 ` [PATCH] change the unpack limit treshold " Linus Torvalds
2006-12-07  3:24   ` Nicolas Pitre
2006-12-07  3:39     ` Linus Torvalds
2006-12-07  4:01 ` Nicolas Pitre [this message]
2006-12-07  7:59   ` [PATCH take 2] " Shawn Pearce

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.64.0612062244090.2630@xanadu.home \
    --to=nico@cam.org \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).