* Re: Git and GCC. Why not with fork, exec and pipes like in linux?
@ 2007-12-06 19:25 J.C. Pizarro
2007-12-06 20:37 ` J.C. Pizarro
0 siblings, 1 reply; 2+ messages in thread
From: J.C. Pizarro @ 2007-12-06 19:25 UTC (permalink / raw)
To: Jon Smirl, Linus Torvalds
Cc: Jeff King, Nicolas Pitre, Daniel Berlin, Harvey Harrison,
David Miller, ismail, gcc, git
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Git and GCC. Why not with fork, exec and pipes like in linux?
2007-12-06 19:25 Git and GCC. Why not with fork, exec and pipes like in linux? J.C. Pizarro
@ 2007-12-06 20:37 ` J.C. Pizarro
0 siblings, 0 replies; 2+ messages in thread
From: J.C. Pizarro @ 2007-12-06 20:37 UTC (permalink / raw)
To: Jon Smirl, Linus Torvalds
Cc: Jeff King, Nicolas Pitre, Daniel Berlin, Harvey Harrison,
David Miller, ismail, gcc, git
On 2007/12/6, J.C. Pizarro <jcpiza@gmail.com>, i wrote:
> 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.
I'm sorry, we don't need exec. We need fork, pipes and another IPC mechanisms
because it so shares easy the C code for parallelism.
Thanks to Linus because GIT is implemented in C language to interact with
system calls of the kernel written in C.
> For Intel Quad Core e.g., x4 cores, it need a parent process and 4
> child processes linked to the parent with pipes.
For peak performance (e.g 99.9% usage), the minimum number of child
processes should be more than 4, normally between e.g. 6 and 10 processes
depending on the statistics of idle's stalls of the cores.
> The parent process can be
> * no-threaded using select/epoll/libevent
> * threaded using Pth (GNU Portable Threads), NPTL (from RedHat) or whatever.
Note: there is a little design's problem with slowdown of I/O bandwith when
the parent is multithreaded and the children MUST to be multithreaded that
we can't avoid them to be non-multithreaded for maximum I/O bandwith.
The "finding of the smallest spanning forest with deltas" consumes a lot of
CPU, so if it scales well in a CPU x4 cores then it can to reduce 4
hours to 1 hour.
J.C.Pizarro :)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-12-06 20:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-06 19:25 Git and GCC. Why not with fork, exec and pipes like in linux? J.C. Pizarro
2007-12-06 20:37 ` J.C. Pizarro
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).