[RFC PATCH 0/2] Add support for multi threaded checkout

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux