summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: eb92242)
raw | patch | inline | side by side (parent: eb92242)
author | Shawn O. Pearce <spearce@spearce.org> | |
Fri, 5 Jan 2007 03:28:08 +0000 (22:28 -0500) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sat, 6 Jan 2007 18:34:56 +0000 (10:34 -0800) |
If we have a 64 bit address space we can easily afford to commit
a larger amount of virtual address space to pack file access.
So on these platforms we should increase the default settings of
core.packedGit{Limit,WindowSize} to something that will better
handle very large projects.
Thanks to Andy Whitcroft for pointing out that we can safely
increase these defaults on such systems.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
a larger amount of virtual address space to pack file access.
So on these platforms we should increase the default settings of
core.packedGit{Limit,WindowSize} to something that will better
handle very large projects.
Thanks to Andy Whitcroft for pointing out that we can safely
increase these defaults on such systems.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Documentation/config.txt | patch | blob | history | |
git-compat-util.h | patch | blob | history |
index 6c838290188fdd1ab6f5efb61c849c10c5e5b94b..b24d9dff6209d6cc101cee5568914938343c9880 100644 (file)
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
more quickly. Smaller window sizes will negatively affect
performance due to increased calls to the operating system's
memory manager, but may improve performance when accessing
- a large number of large pack files. Default is 32 MiB,
- which should be reasonable for all users/operating systems.
- You probably do not need to adjust this value.
+ a large number of large pack files.
++
+Default is 1 MiB if NO_MMAP was set at compile time, otherwise 32
+MiB on 32 bit platforms and 1 GiB on 64 bit platforms. This should
+be reasonable for all users/operating systems. You probably do
+not need to adjust this value.
+
Common unit suffixes of 'k', 'm', or 'g' are supported.
from pack files. If Git needs to access more than this many
bytes at once to complete an operation it will unmap existing
regions to reclaim virtual address space within the process.
- Default is 256 MiB, which should be reasonable for all
- users/operating systems, except on the largest projects.
- You probably do not need to adjust this value.
++
+Default is 256 MiB on 32 bit platforms and 8 GiB on 64 bit platforms.
+This should be reasonable for all users/operating systems, except on
+the largest projects. You probably do not need to adjust this value.
+
Common unit suffixes of 'k', 'm', or 'g' are supported.
diff --git a/git-compat-util.h b/git-compat-util.h
index f243b86d3296579a130220ba5cde74ec954f429d..55456da37cdd25126b7bccae879ca500176220f9 100644 (file)
--- a/git-compat-util.h
+++ b/git-compat-util.h
#else /* NO_MMAP */
#include <sys/mman.h>
-#define DEFAULT_PACKED_GIT_WINDOW_SIZE (32 * 1024 * 1024)
+#define DEFAULT_PACKED_GIT_WINDOW_SIZE \
+ (sizeof(void*) >= 8 \
+ ? 1 * 1024 * 1024 * 1024 \
+ : 32 * 1024 * 1024)
#endif /* NO_MMAP */
-#define DEFAULT_PACKED_GIT_LIMIT (256 * 1024 * 1024)
+#define DEFAULT_PACKED_GIT_LIMIT \
+ (sizeof(void*) >= 8 \
+ ? 8 * 1024 * 1024 * 1024 \
+ : 256 * 1024 * 1024)
#ifdef NO_SETENV
#define setenv gitsetenv