From: Jeff King <peff@peff.net>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Marco Costalba <mcostalba@gmail.com>,
Junio C Hamano <gitster@pobox.com>,
git@vger.kernel.org
Subject: Re: [PATCH WIP] sha1-lookup: make selection of 'middle' less aggressive
Date: Tue, 1 Jan 2008 01:36:16 -0500 [thread overview]
Message-ID: <20080101063616.GA21605@coredump.intra.peff.net> (raw)
In-Reply-To: <alpine.LFD.1.00.0712311232520.32517@woody.linux-foundation.org>
On Mon, Dec 31, 2007 at 12:37:36PM -0800, Linus Torvalds wrote:
> And quite honestly I'm not really even sure that the performance downside
> is entirely about zlib itself: I suspect a lot of the reason zlib shows up
> in the profiles is that the source data is usually cold in the cache, so
> it probably takes a lot of cache misses (it also will take all the page
> faults!).
zlib makes a noticeable impact in real world cases. On a git.git repo,
fully packed with stock config, warm cache:
$ /usr/bin/time git whatchanged >/dev/null
4.12user 0.37system 0:04.50elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+6452minor)pagefaults 0swaps
$ git config pack.compression 0
$ git repack -a -d -f
$ /usr/bin/time git whatchanged >/dev/null
2.93user 0.43system 0:03.36elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+8501minor)pagefaults 0swaps
More pagefaults, but a 25% improvement in wall clock time. The packfile
is noticeably larger (55M versus 40M), so I'm sure the cold cache case
sucks. It may also change with larger repos, where the packfile size
difference kills your cache.
-Peff
next prev parent reply other threads:[~2008-01-01 6:36 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-30 10:22 [PATCH WIP] sha1-lookup: more memory efficient search in sorted list of SHA-1 Junio C Hamano
2007-12-30 11:38 ` [PATCH WIP] sha1-lookup: make selection of 'middle' less aggressive Junio C Hamano
2007-12-30 19:06 ` Marco Costalba
2007-12-30 19:12 ` Marco Costalba
2007-12-31 22:40 ` Shawn O. Pearce
2007-12-30 19:58 ` Linus Torvalds
2007-12-30 21:49 ` Junio C Hamano
2007-12-30 22:04 ` Marco Costalba
2007-12-31 20:37 ` Linus Torvalds
2007-12-31 23:47 ` Marco Costalba
2008-01-01 6:36 ` Jeff King [this message]
2008-01-01 8:40 ` Marco Costalba
2008-01-01 9:01 ` Marco Costalba
2008-01-01 14:51 ` Pierre Habouzit
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=20080101063616.GA21605@coredump.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=mcostalba@gmail.com \
--cc=torvalds@linux-foundation.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).