From: Junio C Hamano <gitster@pobox.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: "git grep" parallelism question
Date: Fri, 26 Apr 2013 11:47:10 -0700 [thread overview]
Message-ID: <7vr4hxw2mp.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <CA+55aFxY2PJ+L=vCfvQ39UGBr7E6m5q76hO=z3Mqm6vTQmmMbw@mail.gmail.com> (Linus Torvalds's message of "Fri, 26 Apr 2013 10:31:40 -0700")
Linus Torvalds <torvalds@linux-foundation.org> writes:
> Wouldn't it be lovely if it was slightly smarter (something more akin
> to the index preloading that takes number of files into account) or at
> least allowed people to set the parallelism explicitly with a command
> line switch?
Yeah, a reasonable starting point for auto-tuning may be to use the
same kind of parameters and heuristics (i.e. max parallel of 20
threads, assume a cost to use an extra thread is the same as running
500 greps), and then tweak them (for example, thread cost of 500 may
be reasonable for lstat() but it would be way too big for grep()).
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.
next prev parent reply other threads:[~2013-04-26 18:47 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-26 17:31 "git grep" parallelism question Linus Torvalds
2013-04-26 18:47 ` Junio C Hamano [this message]
2013-04-26 18:54 ` Linus Torvalds
2013-04-26 19:19 ` Junio C Hamano
2013-04-26 20:31 ` Linus Torvalds
2013-04-27 13:46 ` Thomas Rast
2013-04-29 14:05 ` Ramkumar Ramachandra
2013-04-29 16:18 ` John Keeping
2013-04-29 18:04 ` Thomas Rast
2013-04-29 18:08 ` John Keeping
2013-04-29 22:22 ` Junio C Hamano
2013-04-30 8:08 ` John Keeping
2013-04-30 15:59 ` Jeff King
2013-04-30 16:12 ` John Keeping
2013-04-30 16:14 ` Jeff King
2013-05-05 15:40 ` Pete Wyckoff
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7vr4hxw2mp.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).