git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Add pack.depth option to git-pack-objects and change default depth to 50

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
May 8, 2007, 16:49 UTC
Message-ID
<Pine.LNX.4.64.0705081848330.4167@racer.site>
In-Reply-To
<20070508163044.GA15796@thunk.org>
Hi,
On Tue, 8 May 2007, Theodore Tso wrote:
Show 42 quoted lines
> On Tue, May 08, 2007 at 11:38:46AM -0400, Nicolas Pitre wrote:
> > On Tue, 8 May 2007, Theodore Ts'o wrote:
> > 
> > > Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
> > 
> > I'd prefer if tests were performed on the performance impact before 
> > changing the default depth.  If done separately from this patch then the 
> > commit log could contain those results as well.
> 
> The following results are on a recent git repository, using time to
> record the real, user, and sys times on the two commands: "git-gc
> --no-reuse-delta --window=X --depth=Y" and "git log --pretty=oneline
> -S'object' > /dev/null".  All of these tests were done with a hot
> cache, so disk speed didn't enter into the calculations.
> 
>                 git-gc                     git log -S'object'   pack size
> w=10,d=10       27.1s/25.2s/0.3s           20.8s/20.4s/0.1s     15292k
> w=10,d=30	23.8s/22.3s/0.2s           21.2s/20.9s/0.1s     12996k
> w=10,d=50       24.8s/22.4s/0.4s           21.8s/21.2s/0.1s     12340k
> w=100,d=100     24.1s/22.8s/0.3s           22.4s/21.8s/0.2s     11772k
> 
> w=30,d=10       45.0s/43.1s/0.4s           20.8s/20.5s/0.1s     14388k
> w=30,d=30       35.8s/34.1s/0.3s           21.6s/21.1s/0.1s     11800k
> w=30,d=50       34.6s/33.0s/0.3s           22.1s/21.4s/0.1s     11376k
> w=30,d=100      34.0s/32.2s/0.3s           22.2s/21.6s/0.1s     11012k
> 
> w=50,d=10       56.1s/54.3s/0.4s           21.3s/20.5s/0.1s     14224k
> w=50,d=30       47.2s/45.4s/0.4s           21.6s/21.0s/0.1s     11496k      
> w=50,d=50       44.5s/43.0s/0.3s           21.7s/21.2s/0.1s     11108k
> w=50,d=100      44.3s/42.7s/0.4s           22.4s/21.7s/0.1s     10824k
> 
> So a couple of things immediately become evident.  First of all, as
> Junio predicted, changing --depth makes no difference to the git-gc or
> git log times.  The latter is thanks to the delta chaching.  Secondly,
> changing --depth does make a signficiant difference to the pack size.
> 
> Finally, --window does help somewhat in reducing the pack size, but it
> _significantly_ increases the time to calculate the pack.
> 
> My conclusion given this quick benchmark is that it seems to me that
> changing the defaults of --depth to 50, and keeping --window at 10, is
> a reasonable thing to do.

I'd be happier if that test was done on _at least_ the kernel repo, if not something larger, _plus_ having the numbers on page faults. Swapping can kill performance substantially...

git.git is small.

Ciao, Dscho

Previous: Theodore TsoNext: Theodore Tso
Message 29 of 40 in “Add --no-reuse-delta, --window, and --depth options to git-gc”
  1. Add --no-reuse-delta, --window, and --depth options to git-gcTheodore Ts'o, May 8, 2007
  2. Nicolas PitreMay 8, 2007
  3. Theodore TsoMay 8, 2007
  4. Dana HowMay 8, 2007
  5. Junio C HamanoMay 8, 2007
  6. Theodore Ts'oMay 8, 2007
  7. Add pack.depth option to git-pack-objects and change default depth to 50Theodore Ts'o, May 8, 2007
  8. Add --no-reuse-delta option to git-gcTheodore Ts'o, May 8, 2007
  9. Nicolas PitreMay 8, 2007
  10. Daniel BarkalowMay 9, 2007
  11. Junio C HamanoMay 9, 2007
  12. Steven GrimmMay 9, 2007
  13. Johannes SchindelinMay 9, 2007
  14. Junio C HamanoMay 9, 2007
  15. Shawn O. PearceMay 9, 2007
  16. Sam VilainJun 10, 2007
  17. Nicolas PitreJun 11, 2007
  18. Steven GrimmJun 11, 2007
  19. Shawn O. PearceJun 11, 2007
  20. Johannes SchindelinJun 11, 2007
  21. Nicolas PitreJun 11, 2007
  22. Johannes SchindelinJun 11, 2007
  23. Add --aggressive option to 'git gc'Theodore Tso, May 9, 2007
  24. Junio C HamanoMay 9, 2007
  25. Theodore TsoMay 9, 2007
  26. Junio C HamanoMay 10, 2007
  27. Nicolas PitreMay 8, 2007
  28. Theodore TsoMay 8, 2007
  29. Johannes SchindelinMay 8, 2007
  30. Theodore TsoMay 8, 2007
  31. Nicolas PitreMay 8, 2007
  32. Theodore TsoMay 9, 2007
  33. Johannes SchindelinMay 9, 2007
  34. Dana HowMay 8, 2007
  35. Nicolas PitreMay 8, 2007
  36. Junio C HamanoMay 9, 2007
  37. Nicolas PitreMay 8, 2007
  38. Junio C HamanoMay 8, 2007
  39. Nicolas PitreMay 8, 2007
  40. Nicolas PitreMay 8, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.