git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* 'git status' on NFS performance regression in 1.7.0
@ 2010-02-17 20:08 James Pickens
  2010-02-17 20:22 ` Junio C Hamano
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: James Pickens @ 2010-02-17 20:08 UTC (permalink / raw)
  To: Git ML

Hi,

I noticed that 'git status' in version 1.7.0 is much slower than in 1.6.2.5
on large work trees on NFS - averaging ~13 seconds runtime vs. ~2 seconds.
I did a bit of debugging and found that 'git status' apparently doesn't use
the multi-threaded preload_index any more, although some other commands
like diff still use it.  Was it intentionally dropped from 'git status'?

James

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 'git status' on NFS performance regression in 1.7.0
  2010-02-17 20:08 'git status' on NFS performance regression in 1.7.0 James Pickens
@ 2010-02-17 20:22 ` Junio C Hamano
  2010-02-17 20:23 ` Junio C Hamano
  2010-02-18  8:46 ` Peter Krefting
  2 siblings, 0 replies; 6+ messages in thread
From: Junio C Hamano @ 2010-02-17 20:22 UTC (permalink / raw)
  To: James Pickens; +Cc: Git ML

James Pickens <jepicken@gmail.com> writes:

> I noticed that 'git status' in version 1.7.0 is much slower than in 1.6.2.5
> on large work trees on NFS - averaging ~13 seconds runtime vs. ~2 seconds.
> I did a bit of debugging and found that 'git status' apparently doesn't use
> the multi-threaded preload_index any more, although some other commands
> like diff still use it.  Was it intentionally dropped from 'git status'?

There might be subtle breakage for doing this, but it would be worth a try
;-)

 builtin-commit.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/builtin-commit.c b/builtin-commit.c
index 55676fd..71f81c9 100644
--- a/builtin-commit.c
+++ b/builtin-commit.c
@@ -1046,7 +1046,7 @@ int cmd_status(int argc, const char **argv, const char *prefix)
 	if (*argv)
 		s.pathspec = get_pathspec(prefix, argv);
 
-	read_cache();
+	read_cache_preload();
 	refresh_index(&the_index, REFRESH_QUIET|REFRESH_UNMERGED, s.pathspec, NULL, NULL);
 	s.is_initial = get_sha1(s.reference, sha1) ? 1 : 0;
 	s.in_merge = in_merge;

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: 'git status' on NFS performance regression in 1.7.0
  2010-02-17 20:08 'git status' on NFS performance regression in 1.7.0 James Pickens
  2010-02-17 20:22 ` Junio C Hamano
@ 2010-02-17 20:23 ` Junio C Hamano
  2010-02-17 21:35   ` James Pickens
  2010-02-18  8:46 ` Peter Krefting
  2 siblings, 1 reply; 6+ messages in thread
From: Junio C Hamano @ 2010-02-17 20:23 UTC (permalink / raw)
  To: James Pickens; +Cc: Git ML

James Pickens <jepicken@gmail.com> writes:

> I noticed that 'git status' in version 1.7.0 is much slower than in 1.6.2.5
> on large work trees on NFS - averaging ~13 seconds runtime vs. ~2 seconds.
> I did a bit of debugging and found that 'git status' apparently doesn't use
> the multi-threaded preload_index any more, although some other commands
> like diff still use it.  Was it intentionally dropped from 'git status'?

There might be subtle breakage for doing this, but it would be worth a try
;-)

 builtin-commit.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/builtin-commit.c b/builtin-commit.c
index 55676fd..71f81c9 100644
--- a/builtin-commit.c
+++ b/builtin-commit.c
@@ -1046,7 +1046,7 @@ int cmd_status(int argc, const char **argv, const char *prefix)
 	if (*argv)
 		s.pathspec = get_pathspec(prefix, argv);
 
-	read_cache();
+	read_cache_preload(NULL);
 	refresh_index(&the_index, REFRESH_QUIET|REFRESH_UNMERGED, s.pathspec, NULL, NULL);
 	s.is_initial = get_sha1(s.reference, sha1) ? 1 : 0;
 	s.in_merge = in_merge;

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: 'git status' on NFS performance regression in 1.7.0
  2010-02-17 20:23 ` Junio C Hamano
@ 2010-02-17 21:35   ` James Pickens
  2010-02-17 22:03     ` Junio C Hamano
  0 siblings, 1 reply; 6+ messages in thread
From: James Pickens @ 2010-02-17 21:35 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Git ML

On Wed, Feb 17, 2010, Junio C Hamano <gitster@pobox.com> wrote:
> There might be subtle breakage for doing this, but it would be worth a try
> ;-)

Thanks, with that patch Git 1.7.0 is faster than 1.6.2.5 - ~2 seconds
average runtime vs. ~3 seconds (1.6.2.5 got slower since my original test
last night; must be more network and/or file server traffic right now).

I'm not sure how to interpret the "subtle breakage" comment with the
winking smiley.  Do you mean that preload_index in 1.7.0 is not well tested
and may be broken?  FWIW, I didn't notice any breakage, but I didn't do
much testing.

James

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 'git status' on NFS performance regression in 1.7.0
  2010-02-17 21:35   ` James Pickens
@ 2010-02-17 22:03     ` Junio C Hamano
  0 siblings, 0 replies; 6+ messages in thread
From: Junio C Hamano @ 2010-02-17 22:03 UTC (permalink / raw)
  To: James Pickens; +Cc: Git ML

James Pickens <jepicken@gmail.com> writes:

> I'm not sure how to interpret the "subtle breakage" comment with the
> winking smiley.  Do you mean that preload_index in 1.7.0 is not well tested
> and may be broken?  FWIW, I didn't notice any breakage, but I didn't do
> much testing.

The new "status" codepath is different from "commit --dry-run" codepath
that was used by "git status" in 1.6.6 series.  This old codepath has been
used extensibly with preloaded index and is continued to be used when you
run "git commit" with various options.  It is not preload-index that could
be subtly broken.

However, nobody used the new "status" codepath with preloaded index, and I
haven't thought things through if anything we are doing in that codepath
is incompatible with preloaded index in some way.

By the way, the argument to read_cache_preload() should be s.pathspec, not
NULL, I think.

Thanks.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 'git status' on NFS performance regression in 1.7.0
  2010-02-17 20:08 'git status' on NFS performance regression in 1.7.0 James Pickens
  2010-02-17 20:22 ` Junio C Hamano
  2010-02-17 20:23 ` Junio C Hamano
@ 2010-02-18  8:46 ` Peter Krefting
  2 siblings, 0 replies; 6+ messages in thread
From: Peter Krefting @ 2010-02-18  8:46 UTC (permalink / raw)
  To: James Pickens; +Cc: Git ML

James Pickens:

> I noticed that 'git status' in version 1.7.0 is much slower than in 
> 1.6.2.5 on large work trees on NFS - averaging ~13 seconds runtime vs. ~2 
> seconds.

This applies to local disk as well. Where it used to be almost 
instantaneous, I now see a wait of about three seconds on a checkout of 
about 8,000 files.

-- 
\\// Peter - http://www.softwolves.pp.se/

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-02-18  8:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-17 20:08 'git status' on NFS performance regression in 1.7.0 James Pickens
2010-02-17 20:22 ` Junio C Hamano
2010-02-17 20:23 ` Junio C Hamano
2010-02-17 21:35   ` James Pickens
2010-02-17 22:03     ` Junio C Hamano
2010-02-18  8:46 ` Peter Krefting

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).