All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Kastrup <dak@gnu.org>
To: git@vger.kernel.org
Cc: David Kastrup <dak@gnu.org>
Subject: [PATCH] Bump core.deltaBaseCacheLimit to 96m
Date: Sun,  4 May 2014 19:13:57 +0200	[thread overview]
Message-ID: <1399223637-29964-1-git-send-email-dak@gnu.org> (raw)

The default of 16m causes serious thrashing for large delta chains
combined with large files.

Here are some benchmarks (pu variant of git blame):

time git blame -C src/xdisp.c >/dev/null

for a repository of Emacs repacked with git gc --aggressive (v1.9,
resulting in a window size of 250) located on an SSD drive.  The file in
question has about 30000 lines, 1Mb of size, and a history with about
2500 commits.

16m (previous default):
real	3m33.936s
user	2m15.396s
sys	1m17.352s

32m:
real	3m1.319s
user	2m8.660s
sys	0m51.904s

64m:
real	2m20.636s
user	1m55.780s
sys	0m23.964s

96m:
real	2m5.668s
user	1m50.784s
sys	0m14.288s

128m:
real	2m4.337s
user	1m50.764s
sys	0m12.832s

192m:
real	2m3.567s
user	1m49.508s
sys	0m13.312s

Signed-off-by: David Kastrup <dak@gnu.org>
---
 Documentation/config.txt | 2 +-
 environment.c            | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/config.txt b/Documentation/config.txt
index 1932e9b..21a3c86 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -489,7 +489,7 @@ core.deltaBaseCacheLimit::
 	to avoid unpacking and decompressing frequently used base
 	objects multiple times.
 +
-Default is 16 MiB on all platforms.  This should be reasonable
+Default is 96 MiB on all platforms.  This should be reasonable
 for all users/operating systems, except on the largest projects.
 You probably do not need to adjust this value.
 +
diff --git a/environment.c b/environment.c
index 5c4815d..37354c8 100644
--- a/environment.c
+++ b/environment.c
@@ -37,7 +37,7 @@ int core_compression_seen;
 int fsync_object_files;
 size_t packed_git_window_size = DEFAULT_PACKED_GIT_WINDOW_SIZE;
 size_t packed_git_limit = DEFAULT_PACKED_GIT_LIMIT;
-size_t delta_base_cache_limit = 16 * 1024 * 1024;
+size_t delta_base_cache_limit = 96 * 1024 * 1024;
 unsigned long big_file_threshold = 512 * 1024 * 1024;
 const char *pager_program;
 int pager_use_color = 1;
-- 
1.9.1

             reply	other threads:[~2014-05-04 17:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-04 17:13 David Kastrup [this message]
2014-05-05 10:26 ` [PATCH] Bump core.deltaBaseCacheLimit to 96m Duy Nguyen
2014-05-05 10:27   ` Duy Nguyen
2014-05-05 11:03   ` Matthieu Moy
2014-05-05 11:35     ` Duy Nguyen
2014-05-05 11:20   ` David Kastrup
2014-05-05 20:19     ` Jeff King

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=1399223637-29964-1-git-send-email-dak@gnu.org \
    --to=dak@gnu.org \
    --cc=git@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.