Re: RAM consumption when working with the gcc repo
- From
Jon Smirl <jonsmirl@gmail.com>
- Date
- Dec 7, 2007, 21:23 UTC
- Message-ID
- <9e4733910712071323w5edccdb1pb5d6b05eb00ec97c@mail.gmail.com>
- In-Reply-To
- <alpine.LFD.0.99999.0712071529580.555@xanadu.home>
On 12/7/07, Nicolas Pitre <nico@cam.org> wrote:
Show 31 quoted lines
> On Fri, 7 Dec 2007, david@lang.hm wrote: > > > On Fri, 7 Dec 2007, Jon Smirl wrote: > > > > > I noticed two things when doing a repack of the gcc repo. First is > > > that the git process is getting to be way too big. Turning off the > > > delta caches had minimal impact. Why does the process still grow to > > > 4.8GB? > > > > > > Putting this in perspective, this is a 4.8GB process constructing a > > > 330MB file. Something isn't right. Memory leak or inefficient data > > > structure? > > > > keep in mind that that 330MB file is _very_ heavily compressed. the simple > > zlib compression is probably getting you 10:1 or 20:1 compression and the > > delta compression is a significant multiplier on top of that. > > Doesn't matter. Something is indeed fishy. > > The bulk of pack-objects memory consumption can be estimated as follows: > > 1M objects * sizeof(struct object_entry) ~= 100MB > 256 window entries with data (assuming a big 1MB per entry) = 256MB > Delta result caching was disabled therefore 0MB > read-side delta cache limited to 16MB > > So the purely ram allocation might get to roughly 400MB. > > Then add the pack and index map, which, depending on the original pack > size, > might be 2GB.
I'm repacking the heavily compress pack, so input pack and index are about 360MB, not 2GB.
> > So we're pessimistically talking of about 2.5GB of virtual space. > > The other 2.3GB is hard to explain.
More like 3.5MB that is hard to explain.
Is there a simple way to tell what percent is mmap vs anon allocation?
> > > Nicolas >
-- Jon Smirl jonsmirl@gmail.com