git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Dynamically adjusting packed_git_window_size

From
RBR. Tyler Ballance <tyler@slide.com>
Date
Dec 21, 2008, 21:37 UTC
Message-ID
<1229895454-19498-1-git-send-email-tyler@slide.com>

Internally we are using a custom build of Git, and one of the patches that I apply to newer builds of Git is one to adjust the DEFAULT_PACKED_GIT_WINDOW_SIZE in git-compat-util.h so Git won't trample all over our ulimit values on the 64-bit dev machines.

To do away with this, I've got these two (really one) set of patches to adjust the packed_git_window_size when setup_git_env() is called to a fraction of the "addressspace" limit (RLIMIT_AS). If the user's environment defines "ulimit -v" as "unlimited", this code will not take effect.

It's worth noting that this doesn't force Git to respect these limits, I'm still tracking down an issue hiding in get_revision() where I'm experiencing mmap(2) failures executing a `git log` command with restrictive ulimit settings (Linus, since you were so "pleased" with my last epic gdb fail, here's today's):

	(gdb)
	open_packed_git (p=0x71f2e0) at sha1_file.c:733
	733             /* We leave these file descriptors open with sliding mmap;
	(gdb)
	735              */
	(gdb)
	741                     return error("cannot set FD_CLOEXEC");
	(gdb)
	746             if (hdr.hdr_signature != htonl(PACK_SIGNATURE))
	(gdb)
	Recursive internal problem.
	[1]    17381 abort      GIT_PAGER= gdb git
	tyler@starfruit:~/source/git/main>
Oi vei.

Cheers, -R. Tyler Ballance

Next: R. Tyler Ballance
Message 1 of 8 in “Dynamically adjusting packed_git_window_size”
  1. R. Tyler BallanceDec 21, 2008
  2. Add support for changing packed_git_window_size at process start timeR. Tyler Ballance, Dec 21, 2008
  3. Style changes per suggestions from Junio in #gitR. Tyler Ballance, Dec 21, 2008
  4. Matthieu MoyDec 21, 2008
  5. Shawn O. PearceDec 21, 2008
  6. Shawn O. PearceDec 21, 2008
  7. R. Tyler BallanceDec 22, 2008
  8. Shawn O. PearceDec 26, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.