From: Linus Torvalds <torvalds@linux-foundation.org>
To: Chris Lee <clee@kde.org>
Cc: git@vger.kernel.org
Subject: Re: Partitioned packs
Date: Tue, 3 Apr 2007 19:14:33 -0700 (PDT) [thread overview]
Message-ID: <Pine.LNX.4.64.0704031858470.6730@woody.linux-foundation.org> (raw)
In-Reply-To: <db69205d0704031836u3b3dfc2pb9825dd649aca58@mail.gmail.com>
On Tue, 3 Apr 2007, Chris Lee wrote:
>
> These experiments include trying to see if there's a noticeable
> performance improvement by splitting out objects of different types
> into different packs. So far, it definitely seems to make a
> difference, though not the one I was initially expecting. For all of
> these tests, I did 'sysctl -w vm.drop_caches=3' before running, to
> effectively simulate a cold-cache run.
Ok, the wordwrap makes it a bit hard to read, but it looks like the
single-pack always wins. Sometimes by a huge amount.
The reason is simple: not only are single packs well sorted anyway (so if
you only look at commits, it will only look at the head of the pack
anyway), but a single pack is much faster to look things up in: you can do
a single binary lookup.
If you have multiple packs, you *may* be able to do a single binary
lookup, but quite often you'll do one *failing* binary lookup, and then go
on to the next pack - in other words, you'll do a linear search over a set
of binary lookups.
So trying to partition things doesn't help (because the objects are
already well sorted), and it does hurt.
That said, for most operations it's probably in the noise. Something bad
happened for your "git-blame" thing for the "commits" and "everything
else" case. Perhaps just unlucky ordering of packs.
Linus
next prev parent reply other threads:[~2007-04-04 2:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-04 1:36 Partitioned packs Chris Lee
2007-04-04 1:16 ` David Lang
2007-04-04 1:58 ` Junio C Hamano
2007-04-04 2:14 ` Linus Torvalds [this message]
2007-04-04 2:52 ` Linus Torvalds
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.64.0704031858470.6730@woody.linux-foundation.org \
--to=torvalds@linux-foundation.org \
--cc=clee@kde.org \
--cc=git@vger.kernel.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.
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).