From: "J.C. Pizarro" <jcpiza@gmail.com>
To: "Jon Smirl" <jonsmirl@gmail.com>,
"Linus Torvalds" <torvalds@linux-foundation.org>
Cc: "Jeff King" <peff@peff.net>, "Nicolas Pitre" <nico@cam.org>,
"Daniel Berlin" <dberlin@dberlin.org>,
"Harvey Harrison" <harvey.harrison@gmail.com>,
"David Miller" <davem@davemloft.net>,
ismail@pardus.org.tr, gcc@gcc.gnu.org, git@vger.kernel.org
Subject: Re: Git and GCC. Why not with fork, exec and pipes like in linux?
Date: Thu, 6 Dec 2007 20:25:28 +0100 [thread overview]
Message-ID: <998d0e4a0712061125h3d44139ctb7f5600bc8467292@mail.gmail.com> (raw)
On 2007/12/06, "Jon Smirl" <jonsmirl@gmail.com> wrote:
> On 12/6/07, Linus Torvalds <torvalds@linux-foundation.org> wrote:
> > On Thu, 6 Dec 2007, Jeff King wrote:
> > >
> > > What is really disappointing is that we saved only about 20% of the
> > > time. I didn't sit around watching the stages, but my guess is that we
> > > spent a long time in the single threaded "writing objects" stage with a
> > > thrashing delta cache.
> >
> > I don't think you spent all that much time writing the objects. That part
> > isn't very intensive, it's mostly about the IO.
> >
> > I suspect you may simply be dominated by memory-throughput issues. The
> > delta matching doesn't cache all that well, and using two or more cores
> > isn't going to help all that much if they are largely waiting for memory
> > (and quite possibly also perhaps fighting each other for a shared cache?
> > Is this a Core 2 with the shared L2?)
>
> When I lasted looked at the code, the problem was in evenly dividing
> the work. I was using a four core machine and most of the time one
> core would end up with 3-5x the work of the lightest loaded core.
> Setting pack.threads up to 20 fixed the problem. With a high number of
> threads I was able to get a 4hr pack to finished in something like
> 1:15.
>
> A scheme where each core could work a minute without communicating to
> the other cores would be best. It would also be more efficient if the
> cores could avoid having sync points between them.
>
> --
> Jon Smirl
> jonsmirl@gmail.com
For multicores CPUs, don't divide the work in threads.
To divide the work in processes!
Tips, tricks and hacks: to use fork, exec, pipes and another IPC mechanisms like
mutexes, shared memory's IPC, file locks, pipes, semaphores, RPCs, sockets, etc.
to access concurrently and parallely to the filelocked database.
For Intel Quad Core e.g., x4 cores, it need a parent process and 4
child processes
linked to the parent with pipes.
The parent process can be
* no-threaded using select/epoll/libevent
* threaded using Pth (GNU Portable Threads), NPTL (from RedHat) or whatever.
J.C.Pizarro
next reply other threads:[~2007-12-06 19:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-06 19:25 J.C. Pizarro [this message]
2007-12-06 20:37 ` Git and GCC. Why not with fork, exec and pipes like in linux? J.C. Pizarro
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=998d0e4a0712061125h3d44139ctb7f5600bc8467292@mail.gmail.com \
--to=jcpiza@gmail.com \
--cc=davem@davemloft.net \
--cc=dberlin@dberlin.org \
--cc=gcc@gcc.gnu.org \
--cc=git@vger.kernel.org \
--cc=harvey.harrison@gmail.com \
--cc=ismail@pardus.org.tr \
--cc=jonsmirl@gmail.com \
--cc=nico@cam.org \
--cc=peff@peff.net \
--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).