Re: [PATCH] Enable index-pack threading in msysgit.
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Mar 21, 2014, 01:33 UTC
- Message-ID
- <CACsJy8A_CZYtHvVo5iMzgmP5t7XLxHNRD6n4D=_jiOLOvBgmWQ@mail.gmail.com>
- In-Reply-To
- <CAHOQ7J-sUt3HGYNE7n=X3ZmV3Q-n+n9hMDAtzLbH3YU8iAqoqA@mail.gmail.com>
On Fri, Mar 21, 2014 at 4:56 AM, Stefan Zager <szager@chromium.org> wrote:
Show 7 quoted lines
>> Considering all that, Duy's solution of opening separate file descriptors per thread seems to be the best pattern for future multi-threaded work. > > Does that mean you would endorse the (N threads) * (M pack files) > approach to threading checkout and status? That seems kind of > crazy-town to me. Not to mention that pack windows are not shared, so > this approach to multi-threading can have the side-effect of blowing > out memory consumption.
Maybe we could protect and share the delta cache. Pack windows are mmap'd so we should not need to worry about their memory consumption.
> We have already had to dial back settings for > pack.threads and core.deltaBaseCacheLimit, because threaded index-pack > was causing OOM errors on 32-bit platforms.
Hm.. I don't think index-pack uses sha1_file.c heavily. Local pack access is only needed for verifying identical objects (and that should never happen often). Something is fishy with these OOM errors.
Show 8 quoted lines
> Cygwin (and MSVC) should be able to share a "mostly" compliant pread > implementation. I don't have any insight into NonstopKernel; does is > really not have a thread-safe pread implementation? If so, then I > suppose we have to #ifdef NO_PREAD, just as we do now. > > I realize that these are deep changes. However, the performance of > msysgit on the chromium repositories is pretty awful, enough so to > motivate this work.
-- Duy