All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
To: git@vger.kernel.org
Cc: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Subject: [PATCH 0/4] index-pack improvements
Date: Sat, 25 Feb 2012 17:56:12 +0700	[thread overview]
Message-ID: <1330167376-24859-1-git-send-email-pclouds@gmail.com> (raw)

The first two patches are posted already, which help keep memory usage
down in the present of large blobs. The forth patch attempts to
resolve deltas in parallel.

$ time ./git index-pack --threads=1 --verify -v XXXX
Indexing objects: 100% (165375/165375), done.
Resolving deltas: 100% (124749/124749), done.

real    1m15.470s
user    1m14.899s
sys     0m0.552s

$ time ./git index-pack --threads=2 --verify -v XXXX
Indexing objects: 100% (165375/165375), done.
Resolving deltas: 100% (124749/124749), done.

real    0m41.339s
user    1m15.116s
sys     0m0.680s

$ time ./git index-pack --threads=3 --verify -v XXXX
Indexing objects: 100% (165375/165375), done.
Resolving deltas: 100% (124749/124749), done.

real    0m37.008s
user    1m35.742s
sys     0m0.803s

$ time ./git index-pack --verify -v XXXX   # four core machine
Indexing objects: 100% (165375/165375), done.
Resolving deltas: 100% (124749/124749), done.

real    0m33.701s
user    1m51.316s
sys     0m0.768s

$ time ./git index-pack --threads=8 --verify -v XXXX
Indexing objects: 100% (165375/165375), done.
Resolving deltas: 100% (124749/124749), done.

real    0m33.638s
user    1m51.783s
sys     0m0.773s

So there's improvement from user persepective, but overhead is too
high (user time from 1m14 to 1m51). Making threaded_second_pass to
process 512 consecutive objects each iteration to reduce contention on
work_mutex does not help. Any ideas?

Nguyễn Thái Ngọc Duy (4):
  index-pack --verify: skip sha-1 collision test
  index-pack: reduce memory usage when the pack has large blobs
  index-pack: move second pass code into separate function
  index-pack: support multithreaded delta resolving

 Documentation/config.txt         |    4 +
 Documentation/git-index-pack.txt |   10 ++
 Makefile                         |    2 +-
 builtin/index-pack.c             |  298 +++++++++++++++++++++++++++++++-------
 4 files changed, 260 insertions(+), 54 deletions(-)

-- 
1.7.8.36.g69ee2

             reply	other threads:[~2012-02-25 10:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-25 10:56 Nguyễn Thái Ngọc Duy [this message]
2012-02-25 10:56 ` [PATCH 1/4] index-pack --verify: skip sha-1 collision test Nguyễn Thái Ngọc Duy
2012-02-25 10:56 ` [PATCH 2/4] index-pack: reduce memory usage when the pack has large blobs Nguyễn Thái Ngọc Duy
2012-02-25 10:56 ` [PATCH 3/4] index-pack: move second pass code into separate function Nguyễn Thái Ngọc Duy
2012-02-25 10:56 ` [PATCH 4/4] index-pack: support multithreaded delta resolving Nguyễn Thái Ngọc Duy

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=1330167376-24859-1-git-send-email-pclouds@gmail.com \
    --to=pclouds@gmail.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.