git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Cygwin can't handle huge packfiles?
@ 2006-04-03  9:46 Kees-Jan Dijkzeul
  2006-04-03 13:23 ` Johannes Schindelin
  2006-04-03 14:38 ` Alex Riesen
  0 siblings, 2 replies; 21+ messages in thread
From: Kees-Jan Dijkzeul @ 2006-04-03  9:46 UTC (permalink / raw)
  To: git

Hi,

I'm trying to get Git to manage a 5Gb source tree. Under linux, this
works like a charm. Under cygwin, however, I run in to difficulties.
For example:

$ git-clone sgp-wa/ sgp-wa.clone
fatal: packfile
./objects/pack/pack-56aa013a0234e198467ed37ae5db925764a6ee98.pack
cannot be mapped.
fatal: unexpected EOF
fetch-pack from '/cygdrive/e/Projects/sgp-wa/.git' failed.

To figure out what is happening, I printed the value of errno, which
turns out to be 12 (Cannot allocate memory). I'm not sure how mmap is
implemented in cygwin, but if they allocate memory and load the file
into it, then this error is not surprising, as the pack file in
question is 1.5Gb in size.

I'm not sure how to approach this problem. Any tips would be greatly
appreciated.

Thanks a lot!

Kees-Jan

^ permalink raw reply	[flat|nested] 21+ messages in thread
* Re: Cygwin can't handle huge packfiles?
@ 2006-04-06 20:57 linux
  2006-04-06 23:53 ` Junio C Hamano
  0 siblings, 1 reply; 21+ messages in thread
From: linux @ 2006-04-06 20:57 UTC (permalink / raw)
  To: git, junkio; +Cc: linux

> Right now we LRU the pack files and evict older ones when we
> mmap too many, but the unit of eviction is the whole file, so it
> would not help the case like yours at all.  It might be possible
> to mmap only part of a packfile, but it would involve fairly
> major surgery to sha1_file.c.

The simplest solution seems to be to limit pack file size to a reasonable
fraction of a 32-bit address space.  Say, 0.5 G.

That should be a fairly straightforward hack to git-pack-objects.
It already emits two files; just make it emit more.

You can tweak the heurisitics to try to find a good break point: start
thinking about splitting the pack when you get to one size, but don't
force a break until you hit a harder limit as long as the deltas are
working well.

This can all be adjustable with a command line and/or config file option
to allow for the eventual demise of 32-bit systems.

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2006-04-07 18:47 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-03  9:46 Cygwin can't handle huge packfiles? Kees-Jan Dijkzeul
2006-04-03 13:23 ` Johannes Schindelin
2006-04-03 14:26   ` Morten Welinder
2006-04-03 14:33   ` Linus Torvalds
2006-04-03 14:36     ` Linus Torvalds
2006-04-05 13:24       ` Kees-Jan Dijkzeul
2006-04-05 14:14         ` Johannes Schindelin
2006-04-05 21:08           ` Christopher Faylor
2006-04-05 23:27             ` Rutger Nijlunsing
2006-04-06  0:34               ` Christopher Faylor
2006-04-06  4:13         ` Junio C Hamano
2006-04-07  8:15       ` Junio C Hamano
2006-04-07  8:27         ` Jakub Narebski
2006-04-07 14:11         ` Nicolas Pitre
2006-04-07 18:31           ` Junio C Hamano
2006-04-07 18:46             ` Nicolas Pitre
2006-04-03 15:12     ` Johannes Schindelin
2006-04-03 14:38 ` Alex Riesen
  -- strict thread matches above, loose matches on Subject: below --
2006-04-06 20:57 linux
2006-04-06 23:53 ` Junio C Hamano
2006-04-07  3:05   ` linux

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).