Re: Git and GCC
- From
Jon Smirl <jonsmirl@gmail.com>
- Date
- Dec 6, 2007, 22:44 UTC
- Message-ID
- <9e4733910712061444i64c115e2y94f6212dd7a4ddda@mail.gmail.com>
- In-Reply-To
- <alpine.LFD.0.99999.0712061726240.555@xanadu.home>
On 12/6/07, Nicolas Pitre <nico@cam.org> wrote:
Show 10 quoted lines
> > > Well, that's possible with a window 25 times larger than the default. > > > > Why did it never use more than three cores? > > You have 648366 objects total, and only 647457 of them are subject to > delta compression. > > With a window size of 250 and a default thread segment of window * 1000 > that means only 3 segments will be distributed to threads, hence only 3 > threads with work to do.
One little tweak and the clock time drops from 9.5 to 6 minutes. The tweak makes all four cores work.
jonsmirl@terra:/home/apps/git$ git diff
diff --git a/builtin-pack-objects.c b/builtin-pack-objects.c index 4f44658..e0dd12e 100644 --- a/builtin-pack-objects.c +++ b/builtin-pack-objects.c @@ -1645,7 +1645,7 @@ static void ll_find_deltas(struct object_entry **list, unsigned list_size, } /* this should be auto-tuned somehow */ - chunk_size = window * 1000; + chunk_size = window * 50; do { unsigned sublist_size = chunk_size; jonsmirl@terra:/home/linux/.git$ time git repack -a -d -f --depth=250 --window=250 Counting objects: 648366, done. Compressing objects: 100% (647457/647457), done. Writing objects: 100% (648366/648366), done. Total 648366 (delta 539043), reused 0 (delta 0) real 6m2.109s user 20m0.491s sys 0m4.608s jonsmirl@terra:/home/linux/.git$ > > > Nicolas >
-- Jon Smirl jonsmirl@gmail.com