From: Dan McGee <dpmcgee@gmail.com>
To: Nicolas Pitre <nico@cam.org>
Cc: Jeff King <peff@peff.net>, git@vger.kernel.org
Subject: Re: [PATCH 2/2] pack-objects: report actual number of threads to be used
Date: Sun, 5 Apr 2009 21:09:29 -0500 [thread overview]
Message-ID: <449c10960904051909v5ec5d7danc10d13d9a1d613f0@mail.gmail.com> (raw)
In-Reply-To: <alpine.LFD.2.00.0904042001540.6741@xanadu.home>
On Sat, Apr 4, 2009 at 7:11 PM, Nicolas Pitre <nico@cam.org> wrote:
> On Sat, 4 Apr 2009, Jeff King wrote:
>
>> On Sat, Apr 04, 2009 at 01:20:18PM -0500, Dan McGee wrote:
>>
>> > > That makes sense to me, though I wonder if it may confuse and frustrate
>> > > users who are expecting their awesome quad-core machine to be using 4
>> > > threads when it only uses 2. Is it worth printing both values, or some
>> > > indicator that we could have been using more?
>> >
>> > I thought of this, but decided it wasn't really worth it. The default
>> > window size of 10 makes it a very rare case that you will use fewer
>> > than 4 threads. With the default, each thread needs a minimum of 20
>> > objects, so even a 100-object repository would spawn the 4 threads.
>>
>> Good point. Though by that logic, isn't your patch also not worth it
>> (i.e., it is unlikely not to fill the threads, so the output will be the
>> same with or without it)?
>>
>> I still think yours is an improvement, though, however slight.
>
> I don't think this is worth it at all.
>
> This display is there mainly to confirm expected number of available
> threads. The number of actually active threads is an implementation
> detail. Sure if the number of objects is too low, or if the window size
> is too large, then the number of active threads will be lower. But in
> practice it is also possible that with some patological object set you
> end up with 2 threads out of 4 completing very quickly and the other 2
> threads still busy with big objects and total remaining work set too
> small to split it further amongst idle threads, meaning that you'll end
> up with only 2 busy CPUs even though the display said 4 threads
> initially even with this patch.
>
> In other words I don't think this patch is a good idea as we don't
> update the display with remaining active threads along the way.
Why do we show this misleading at best piece of information at all
then? I'd rather completely remove it than show lies to the user. It
sounds like it is only there for debugging purposes.
If we choose to keep it, I propose either accepting my patch so we are
not mislead, or dropping the thread count completely from the output
and saying only something like "Using multi-threaded delta
compression."
-Dan
next prev parent reply other threads:[~2009-04-06 2:11 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-04 16:59 [PATCH 1/2] git-repack: use non-dashed update-server-info Dan McGee
2009-04-04 16:59 ` [PATCH 2/2] pack-objects: report actual number of threads to be used Dan McGee
2009-04-04 18:06 ` Jeff King
2009-04-04 18:20 ` Dan McGee
2009-04-04 23:25 ` Jeff King
2009-04-05 0:11 ` Nicolas Pitre
2009-04-06 2:09 ` Dan McGee [this message]
2009-04-06 2:31 ` Nicolas Pitre
2009-04-06 2:34 ` Dan McGee
2009-04-06 3:14 ` Nicolas Pitre
2009-04-08 6:30 ` Junio C Hamano
2009-04-09 15:45 ` [PATCH] Update delta compression message to be less misleading Dan McGee
2009-04-11 19:24 ` Junio C Hamano
2009-04-11 19:42 ` Dan McGee
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=449c10960904051909v5ec5d7danc10d13d9a1d613f0@mail.gmail.com \
--to=dpmcgee@gmail.com \
--cc=git@vger.kernel.org \
--cc=nico@cam.org \
--cc=peff@peff.net \
/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).