Re: hosting git on a nfs
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 14, 2008, 20:14 UTC
- Message-ID
- <7v63mq9iao.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <alpine.LFD.2.00.0811141109580.3468@nehalem.linux-foundation.org>
Linus Torvalds <torvalds@linux-foundation.org> writes:
Show 11 quoted lines
> I also think the thread cost was wrong: it did > > threads = index->cache_nr / 100; > > to give a first-order "how many threads do we want", but the thread > startup is likely to be higher than 100 lstat calls, so we probably want > fewer threads than that. It doesn't much matter for something like the > Linux kernel, where there are so many files that we'll end up maxing out > the threads anyway, but for smaller projects, I suspect a thread cost of > "one thread per 500 files" is more reasonable. You almost certainly don't > want to thread anything at all for fewer than a few hundred files.
If you have 1000 files in a single directory, do you still want 2 threads following the "1/500" rule, or they would compete reading the same directory and using a single thread is better off?