git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Jon Smirl" <jonsmirl@gmail.com>
To: "Shawn O. Pearce" <spearce@spearce.org>
Cc: "Martin Koegler" <mkoegler@auto.tuwien.ac.at>,
	"Git Mailing List" <git@vger.kernel.org>
Subject: Re: performance on repack
Date: Tue, 14 Aug 2007 01:57:04 -0400	[thread overview]
Message-ID: <9e4733910708132257xfa7e1b5md77198c7ed80488d@mail.gmail.com> (raw)
In-Reply-To: <20070814051321.GG27913@spearce.org>

On 8/14/07, Shawn O. Pearce <spearce@spearce.org> wrote:
> Jon Smirl <jonsmirl@gmail.com> wrote:

> One could probably argue that the defaults for 64b are too small;
> perhaps they should be closer to 4G/24G seeing as how the 64b address
> space is so huge that we're unlikely to run into issues with being
> able to use >24G of virtual address at once.

We've got 24,000GB of address space to play with. Why not set them
64G/512GB and forget about them for a decade?


> > I haven't measured it but I suspect the OS calls for moving the
> > windows are are quite slow on a relative basis since they have to
> > rewrite a bunch of page tables.
>
> Maybe.  Add a call to pack_report() at the end of the program you
> are interested in and run it.  We keep track of how often we move
> windows around; you may find that we don't move them often enough
> (or at all) to cause problems here.  Or just run it under strace
> and watch mmap() activity, filtering out the uninteresting bits.
>
> > Why is the window so small on 32b? I
> > thought we were up to about a 1GB packfile before running out of
> > address space with Mozilla. Shouldn't the window simply be set as
> > large as possible on 32b, this size being a function of the available
> > address space, not the amount of physical memory?
>
> Because programs need to malloc() stuff to work.  And we need
> stack space.  And we need to let the runtime linker mmap() in the
> shared libraries we are linked to.  All in all we do get tight in
> some 32b cases.  The above defaults for 32b were chosen based on
> the Linux kernel repository (its under 256M) and based on some
> (crude) performance testing on Linux (which seemed to say the
> 32M packedGitWindowSize wasn't really hurting us).  They were
> basically set to give us maximum address space for working heap
> and yet not have a negative impact on one of our (at the time)
> largest user groups.

Kernel is barely under 256M.

Do we need two limits, could we just start with the big one and assign
first packfile fully to it, then start dividing it up dynamically as
more pack files are opened?

core.packedGitLimit
core.packedGitWindowSize

The real question is, what's the access pattern into the windows? If
it is random then the windows get moved around continuously. If is it
more or less sequential the windows will hardly get moved at all.


Of course multi-threading the diff computation is going to do far more
for me than playing with the window size.


> In particular repack (aka git-pack-objects) is a real memory pig,
> especially now with its various caches.  The more address space we
> can let it use in a 32b case the better off we probably are.
>
> If someone can show that increasing these 32b defaults is the
> right thing to do even in very large repositories, *especially*
> with something really brutal like `git-blame` on a very busy file or
> `git repack -f -a` then please submit a patch to boost them.  ;-)
>
> --
> Shawn.
>


-- 
Jon Smirl
jonsmirl@gmail.com

  reply	other threads:[~2007-08-14  5:57 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-11 21:12 performance on repack Jon Smirl
2007-08-11 22:09 ` David Kastrup
2007-08-11 22:34   ` Linus Torvalds
2007-08-11 23:21     ` Jon Smirl
2007-08-12 10:33 ` Martin Koegler
2007-08-12 13:49   ` Jon Smirl
2007-08-14  3:12     ` Shawn O. Pearce
2007-08-14  4:10       ` Jon Smirl
2007-08-14  5:13         ` Shawn O. Pearce
2007-08-14  5:57           ` Jon Smirl [this message]
2007-08-14 14:52       ` Nicolas Pitre
2007-08-14 21:41       ` Nicolas Pitre
2007-08-15  1:20         ` Jon Smirl
2007-08-15  1:59           ` Nicolas Pitre
2007-08-15  5:32         ` Shawn O. Pearce
2007-08-15 15:08           ` Jon Smirl
2007-08-15 17:11             ` Martin Koegler
2007-08-15 18:38               ` Jon Smirl
2007-08-15 19:00                 ` Nicolas Pitre
2007-08-15 19:42                   ` Jon Smirl
2007-08-16  8:10                   ` David Kastrup
2007-08-16 15:34                     ` Nicolas Pitre
2007-08-16 16:13                       ` Jon Smirl
2007-08-16 16:21                         ` Nicolas Pitre
2007-08-15 21:05             ` Nicolas Pitre
2007-08-15 20:49           ` Nicolas Pitre
2007-08-30  4:27             ` Nicolas Pitre
2007-08-30  4:36               ` Nicolas Pitre
2007-08-30 16:17                 ` Jon Smirl
2007-09-01 21:54                 ` 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=9e4733910708132257xfa7e1b5md77198c7ed80488d@mail.gmail.com \
    --to=jonsmirl@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=mkoegler@auto.tuwien.ac.at \
    --cc=spearce@spearce.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).