Re: "git grep" parallelism question
From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2016-06-15 22:57:01
On Fri, Apr 26, 2013 at 11:47 AM, Junio C Hamano [off-list ref] wrote:
The real issue may be that we do not have a good estimate of how many paths are involved in the request before starting these threads, though.
Yes. Also, I'm not sure if the 15% possible improvement on my SSD case
is even worth it for something that in the end isn't necessarily the
common case. I *suspect* that it might be a much bigger deal on NFS
(IO parallelism really does end up being a big deal sometimes, and
caching tends to be less aggressive too), but on rotational media it
might be much less clear, or even a loss..
Are there people out there who use "git grep" over NFS and have been
unhappy with performance? If are willing to recompile git with a
different THREAD value in builtin/grep.c, then on a Linux client you
can try
echo 3 > /proc/sys/vm/drop_caches
to largely force cold-cache behavior for testing (I say "largely",
because it won't drop busy/dirty pages, but for "git grep" kind of
loads it should be good).
Of course, you need root for it, so..
Linus