From: Michael J Gruber <git@drmicha.warpmail.net>
To: klinkert@webgods.de
Cc: gitster@pobox.com, git@vger.kernel.org
Subject: Re: [PATCH] Improving performance with pthreads in refresh_index().
Date: Tue, 11 Oct 2011 13:50:14 +0200 [thread overview]
Message-ID: <4E942D76.7030908@drmicha.warpmail.net> (raw)
In-Reply-To: <1318325521-23262-1-git-send-email-klinkert@webgods.de>
klinkert@webgods.de venit, vidit, dixit 11.10.2011 11:32:
> Git performs for every file in a repository at least one (with a cold cache)
> lstat(). In larger repositories operations like git status take a
> long time. In case your local repository is located on a remote server
> (e. g. mounted via nfs) it ends up in an *incredible* slow git.
>
> With this patch you're able to determine a number of threads (maxthreads)
> in your config file to run these tons of lstats in threads. There
> won't be created any pthreads if you haven't set maxthreads. In my
> test cases a git status with this patch performs enormously faster (over
> two minutes before and approximately 25 seconds now). Of course, it
> has a positive impact on other git commands, too.
Can you specify under which circumstances one should get a speedup? Our
NFS isn't slow enough... but on a dead slow sshfs work tree I get the
following for "git status -s":
maxthreads: 0, preloadindex: false, time: 14.73
maxthreads: 1, preloadindex: false, time: 14.25
maxthreads: 2, preloadindex: false, time: 13.32
maxthreads: 3, preloadindex: false, time: 12.40
maxthreads: 4, preloadindex: false, time: 12.65
maxthreads: 5, preloadindex: false, time: 12.16
maxthreads: 8, preloadindex: false, time: 12.32
maxthreads: 10, preloadindex: false, time: 11.98
maxthreads: 15, preloadindex: false, time: 12.31
maxthreads: 20, preloadindex: false, time: 12.00
maxthreads: 0, preloadindex: true, time: 12.17
maxthreads: 1, preloadindex: true, time: 11.98
maxthreads: 2, preloadindex: true, time: 12.21
maxthreads: 3, preloadindex: true, time: 11.99
maxthreads: 4, preloadindex: true, time: 12.14
maxthreads: 5, preloadindex: true, time: 12.21
maxthreads: 8, preloadindex: true, time: 12.14
maxthreads: 10, preloadindex: true, time: 12.08
maxthreads: 15, preloadindex: true, time: 12.16
maxthreads: 20, preloadindex: true, time: 11.96
So it seams it gives me what preloadindex does, which is not much.
Note: I'm not saying the patch is bad. I'm just wondering whether that
is expected.
Michael
P.S.: It's actually sshfs with ssh to an NFSv3 client (server restricts
exports) :(
next prev parent reply other threads:[~2011-10-11 11:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-11 9:32 [PATCH] Improving performance with pthreads in refresh_index() klinkert
2011-10-11 10:46 ` Johannes Sixt
2011-10-11 10:59 ` Nguyen Thai Ngoc Duy
2011-10-11 11:50 ` Michael J Gruber [this message]
2011-10-12 7:21 ` Simon Klinkert
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=4E942D76.7030908@drmicha.warpmail.net \
--to=git@drmicha.warpmail.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=klinkert@webgods.de \
/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.