git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Jon Smirl" <jonsmirl@gmail.com>
To: "Nicolas Pitre" <nico@cam.org>
Cc: "Git Mailing List" <git@vger.kernel.org>
Subject: Re: Something is broken in repack
Date: Mon, 10 Dec 2007 15:05:53 -0500	[thread overview]
Message-ID: <9e4733910712101205q218152a2td14a8931e63d2610@mail.gmail.com> (raw)
In-Reply-To: <alpine.LFD.0.99999.0712101434560.555@xanadu.home>

On 12/10/07, Nicolas Pitre <nico@cam.org> wrote:
> On Fri, 7 Dec 2007, Jon Smirl wrote:
>
> > Using this config:
> > [pack]
> >         threads = 4
> >         deltacachesize = 256M
> >         deltacachelimit = 0
> >
> > And the 330MB gcc pack for input
> >  git repack -a -d -f  --depth=250 --window=250
> >
> > complete seconds RAM
> > 10%  47 1GB
> > 20%  29 1Gb
> > 30%  24 1Gb
> > 40%  18 1GB
> > 50%  110 1.2GB
> > 60%  85 1.4GB
> > 70%  195 1.5GB
> > 80%  186 2.5GB
> > 90%  489 3.8GB
> > 95%  800 4.8GB
> > I killed it because it started swapping
> >
> > The mmaps are only about 400MB in this case.
> > At the end the git process had 4.4GB of physical RAM allocated.
> >
> > Starting from a highly compressed pack greatly aggravates the problem.
> > Starting with a 2GB pack of the same data my process size only grew to
> > 3GB with 2GB of mmaps.
>
> You said having reproduced the issue, albeit not as severe, with the
> Linux kernel repo.  I did just that:
>
> # to get the default pack:
> $ git repack -a -f -d
>
> # first measurement with a repack from a default pack
> $ /usr/bin/time git repack -a -f --window=256 --depth=256
> 2572.17user 5.87system 22:46.80elapsed 188%CPU (0avgtext+0avgdata 0maxresident)k
> 15720inputs+356640outputs (71major+264376minor)pagefaults 0swaps
>
> # do it again to start from a highly packed pack
> $ /usr/bin/time git repack -a -f --window=256 --depth=256
> 2573.53user 5.62system 22:45.60elapsed 188%CPU (0avgtext+0avgdata 0maxresident)k
> 29176inputs+356664outputs (210major+274887minor)pagefaults 0swaps
>
> This is with pack.threads=2 on a P4 with HT, and I'm using the machine
> for other tasks as well, but all measured time is sensibly the same for
> both cases.  Virtual memory allocation never reached 700MB in both cases
> either.
>

This is the mail about the kernel pack, the one you quoted is a gcc run.

The kernel repo has the same problem but not nearly as bad.

Starting from a default pack
 git repack -a -d -f  --depth=1000 --window=1000
Uses 1GB of physical memory

Now do the command again.
 git repack -a -d -f  --depth=1000 --window=1000
Uses 1.3GB of physical memory

I suspect the gcc repo has much longer revision chains than the kernel
one since the kernel repo is only a few years old. The Mozilla repo
contained revision chains with over 2,000 revisions. Longer revision
chains result in longer delta chains.

So what is allocating the extra memory? Either a function of the
number of entries in the chain, or related to accessing the chain
since a chain with more entries will need to be accessed more times.

I have a 168MB kernel pack now after 15 minutes of four cores at 100%.

Here's another observation, the gcc objects are larger. Kernel has
650K objects in 190MB, gcc has 870K objects in 330MB. Average gcc
object is 30% larger. How should the average kernel developer
interpret this?



>
> Nicolas
>


-- 
Jon Smirl
jonsmirl@gmail.com

  reply	other threads:[~2007-12-10 20:07 UTC|newest]

Thread overview: 82+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-07 23:05 Something is broken in repack Jon Smirl
2007-12-08  0:37 ` Linus Torvalds
2007-12-08  1:27   ` [PATCH] pack-objects: fix delta cache size accounting Nicolas Pitre
2007-12-08  1:46 ` Something is broken in repack Nicolas Pitre
2007-12-08  2:04   ` Jon Smirl
2007-12-08  2:28     ` Nicolas Pitre
2007-12-08  3:29       ` Jon Smirl
2007-12-08  3:37         ` David Brown
2007-12-08  4:22           ` Jon Smirl
2007-12-08  4:30             ` Nicolas Pitre
2007-12-08  5:01               ` Jon Smirl
2007-12-08  5:12                 ` Nicolas Pitre
2007-12-08  3:48         ` Harvey Harrison
2007-12-08  2:22   ` Jon Smirl
2007-12-08  3:44   ` Harvey Harrison
2007-12-08 22:18   ` Junio C Hamano
2007-12-09  8:05     ` Junio C Hamano
2007-12-09 15:19       ` Jon Smirl
2007-12-09 18:25       ` Jon Smirl
2007-12-10  1:07         ` Nicolas Pitre
2007-12-10  2:49     ` Nicolas Pitre
2007-12-08  2:56 ` David Brown
2007-12-10 19:56 ` Nicolas Pitre
2007-12-10 20:05   ` Jon Smirl [this message]
2007-12-10 20:16     ` Morten Welinder
2007-12-11  2:25 ` Jon Smirl
2007-12-11  2:55   ` Junio C Hamano
2007-12-11  3:27     ` Nicolas Pitre
2007-12-11 11:08       ` David Kastrup
2007-12-11 12:08         ` Pierre Habouzit
2007-12-11 12:18           ` David Kastrup
2007-12-11  3:49   ` Nicolas Pitre
2007-12-11  5:25     ` Jon Smirl
2007-12-11  5:29       ` Jon Smirl
2007-12-11  7:01         ` Jon Smirl
2007-12-11  7:34           ` Andreas Ericsson
2007-12-11 13:49           ` Nicolas Pitre
2007-12-11 15:00             ` Nicolas Pitre
2007-12-11 15:36               ` Jon Smirl
2007-12-11 16:20               ` Nicolas Pitre
2007-12-11 16:21                 ` Jon Smirl
2007-12-12  5:12                   ` Nicolas Pitre
2007-12-12  8:05                     ` David Kastrup
2007-12-14 16:18                       ` Wolfram Gloger
2007-12-12 15:48                     ` Nicolas Pitre
2007-12-12 16:17                       ` Paolo Bonzini
2007-12-12 16:37                       ` Linus Torvalds
2007-12-12 16:42                         ` David Miller
2007-12-12 16:54                           ` Linus Torvalds
2007-12-12 17:12                         ` Jon Smirl
2007-12-14 16:12                         ` Wolfram Gloger
2007-12-14 16:45                           ` David Kastrup
2007-12-14 16:59                             ` Wolfram Gloger
2007-12-13 13:32                       ` Nguyen Thai Ngoc Duy
2007-12-13 15:32                         ` Paolo Bonzini
2007-12-13 16:29                           ` Paolo Bonzini
2007-12-13 16:39                           ` Johannes Sixt
2007-12-14  1:04                             ` Jakub Narebski
2007-12-14  6:14                               ` Paolo Bonzini
2007-12-14  6:24                                 ` Nguyen Thai Ngoc Duy
2007-12-14  8:20                                   ` Paolo Bonzini
2007-12-14  9:01                                     ` Harvey Harrison
2007-12-14 10:40                                   ` Jakub Narebski
2007-12-14 10:52                                     ` Nguyen Thai Ngoc Duy
2007-12-14 13:25                                 ` Nicolas Pitre
2007-12-12 16:13                     ` Nicolas Pitre
2007-12-13  7:32                       ` Andreas Ericsson
2007-12-14 16:03                         ` Wolfram Gloger
2007-12-11 16:33           ` Linus Torvalds
2007-12-11 17:21             ` Nicolas Pitre
2007-12-11 17:24               ` David Miller
2007-12-11 17:44                 ` Nicolas Pitre
2007-12-11 20:26                   ` Andreas Ericsson
2007-12-11 18:43             ` Jon Smirl
2007-12-11 18:57               ` Nicolas Pitre
2007-12-11 19:17               ` Linus Torvalds
2007-12-11 19:40                 ` Junio C Hamano
2007-12-11 20:34                   ` Andreas Ericsson
2007-12-11 17:28           ` Daniel Berlin
2007-12-11 13:31         ` Nicolas Pitre
2007-12-11  6:01       ` Sean
2007-12-11  6:20         ` Jon Smirl

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9e4733910712101205q218152a2td14a8931e63d2610@mail.gmail.com \
    --to=jonsmirl@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=nico@cam.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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).