git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Rast <trast@inf.ethz.ch>
To: Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Cc: <git@vger.kernel.org>, Junio C Hamano <gitster@pobox.com>,
	Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Subject: Re: [PATCH v2 2/2] index-pack: support multithreaded delta resolving
Date: Mon, 12 Mar 2012 12:47:55 +0100	[thread overview]
Message-ID: <87boo282hg.fsf@thomas.inf.ethz.ch> (raw)
In-Reply-To: <CACsJy8CyLgKrEAriS-uLU9qG6ahBeQ6qLbvHiLvsbTjMZsMW+g@mail.gmail.com> (Nguyen Thai Ngoc Duy's message of "Mon, 12 Mar 2012 18:42:14 +0700")

Nguyen Thai Ngoc Duy <pclouds@gmail.com> writes:

> 2012/3/12 Thomas Rast <trast@inf.ethz.ch>:
>> Nguyễn Thái Ngọc Duy <pclouds@gmail.com> writes:
>>
>>> This puts delta resolving on each base on a separate thread, one base
>>> cache per thread. Per-thread data is grouped in struct thread_local.
>>> When running with nr_threads == 1, no pthreads calls are made. The
>>> system essentially runs in non-thread mode.
>>
>> As discussed when we took the git-grep measurements, it may be
>> interesting to have a way to run 1 thread.  Can you put in such an
>> option?
>
> Sorry I wasn't clear, nr_threads == 1 is equivalent to --threads=1. So
> yes it supports running in non-thread mode.

Well, in that case I wasn't clear: I meant that there should be a way to
run with the whole threading machinery enabled, but still only have one
thread (doing the work, possibly having another that fills the queue).

That allows us to see how big the overhead is.

>> Oh, and could you write a perf test for this? :-)
>
> Yeah, about that, index-pack is mostly used as part of git-fetch or
> git-clone. Maybe we need to add --threads to those commands too, then
> we can see how clone/fetch performs. I'll need such tests anyway if
> I'm going to push for cheaper connectivity check in git-fetch in
> another thread.
>
> I guess one test with --threads=1, one with threads=2 and one without
> --threads. Any ideas? We can try testing it on half available cores,
> all cores, double available cores, but that would require exporting
> online_cpus(), perhaps via test command. I didn't see grep --threads
> perf test either (wanted to use it as template..)

A simple one is in t/perf/p7810-grep.sh (in master already).  It doesn't
test threads though.  For index-pack you'll also have to find a good way
to choose a pack, perhaps simply the biggest one in the repo.

-- 
Thomas Rast
trast@{inf,student}.ethz.ch

  reply	other threads:[~2012-03-12 11:48 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-12  2:32 [PATCH v2 0/2] Multithread index-pack Nguyễn Thái Ngọc Duy
2012-03-12  2:32 ` [PATCH v2 1/2] index-pack: split second pass obj handling into own function Nguyễn Thái Ngọc Duy
2012-03-12  2:32 ` [PATCH v2 2/2] index-pack: support multithreaded delta resolving Nguyễn Thái Ngọc Duy
2012-03-12 10:57   ` Thomas Rast
2012-03-12 11:42     ` Nguyen Thai Ngoc Duy
2012-03-12 11:47       ` Thomas Rast [this message]
2012-03-12 12:18         ` Nguyen Thai Ngoc Duy
2012-03-13  0:32   ` Ramsay Jones
2012-03-14 10:29     ` Nguyen Thai Ngoc Duy
  -- strict thread matches above, loose matches on Subject: below --
2012-03-02  6:09 [PATCH " Junio C Hamano
2012-03-02 13:42 ` [PATCH v2 " Nguyễn Thái Ngọc Duy
2012-03-02 18:53   ` Junio C Hamano

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=87boo282hg.fsf@thomas.inf.ethz.ch \
    --to=trast@inf.ethz.ch \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=pclouds@gmail.com \
    --cc=ramsay@ramsay1.demon.co.uk \
    /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).