git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/2] Add support for multi threaded checkout
@ 2008-12-18 20:51 Pickens, James E
  2008-12-18 20:56 ` [PATCH 1/2] " James Pickens
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Pickens, James E @ 2008-12-18 20:51 UTC (permalink / raw)
  To: git@vger.kernel.org


There was some discussion a while back about improving git performance on
NFS (http://article.gmane.org/gmane.comp.version-control.git/100950).
This led to Linus adding the 'preload_index' function, which improves
performance of several commands using multi threading.  He also briefly
described how to do the same for 'git checkout'.  Well, I finally found
some time to work on it, and will post patches shortly.  This is my first
patch; apologies if I screwed something up.

Patch 1 adds the functionality, and 2 adds a config option to
enable/disable it.

Much of the patch is literally copy/paste from preload-index.c into
unpack-trees.c.  Many of the functions called during checkout are not
thread safe, so I added a mutex in entry.c to serialize basically
everything except writing the files to disk.  I also added a mutex in
unpack-trees.c for the progress meter.

It passes the test suite, and seems fairly safe to my naïve eyes.

Here are some benchmarks, cloning a linux kernel repo I had on an NFS
drive:

                   NFS->NFS    NFS->Local
master (53682f0c)    2:46.1          13.3
with threads           36.6          18.2

So it improved performance on NFS significantly.  Unfortunately it also
degraded performance on the local disk significantly.  I'm hoping someone
will suggest a way to mitigate that... I think it would be reasonable to
disable the threading except when the work dir is on NFS, but I don't
know how to detect that.  Even in that case it will have *some* impact
from locking/unlocking the mutex, but I think it would be in the noise.

James

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

end of thread, other threads:[~2008-12-19  1:05 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-18 20:51 [RFC PATCH 0/2] Add support for multi threaded checkout Pickens, James E
2008-12-18 20:56 ` [PATCH 1/2] " James Pickens
2008-12-18 20:56   ` [PATCH 2/2] Add core.threadedcheckout config option James Pickens
2008-12-18 21:41   ` [PATCH 1/2] Add support for multi threaded checkout Linus Torvalds
2008-12-18 23:35     ` James Pickens
2008-12-19  0:13       ` Linus Torvalds
2008-12-18 21:02 ` [RFC PATCH 0/2] " Nicolas Pitre
2008-12-18 21:13   ` James Pickens
2008-12-18 21:16 ` Nicolas Morey-Chaisemartin
2008-12-18 21:42   ` James Pickens
2008-12-19  1:04   ` James Pickens

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