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

Re: Surprising use of memory and time when repacking mozilla's gecko repository

From
Mike Hommey <mh@glandium.org>
Date
Jul 5, 2019, 05:45 UTC
Message-ID
<20190705054516.mke7aqk2cdsffkpd@glandium.org>
In-Reply-To
<20190705050955.GA25459@sigill.intra.peff.net>
On Fri, Jul 05, 2019 at 01:09:55AM -0400, Jeff King wrote:
Show 20 quoted lines
> On Thu, Jul 04, 2019 at 07:05:30PM +0900, Mike Hommey wrote:
> > Finally, with 1 thread, the picture changes greatly. The overall process
> > takes 2.5h:
> > - 50 seconds enumerating and counting objects.
> > - ~2.5h compressing objects.
> > - 3 minutes and 25 seconds writing objects!
> 
> That's weird. I'd expect us to find similar amounts of deltas, but we
> don't have the writing slow-down. I wonder if there is some bad
> interaction between the multi-threaded code and the delta cache.
> 
> Did you run the second, single-thread run against the exact same
> original repository you had? Or did you re-run it on the result of the
> multi-thread run? Another explanation is that the original repository
> had some poor patterns that made objects expensive to access (say, a ton
> of really deep delta chains). And so the difference between the two runs
> was not the threads, but just the on-disk repository state.
> 
> Kind of a long shot, but if that is what happened, try running another
> multi-threaded "repack -f" and see if its writing phase is faster.

I've run 36-threads, 16-threads and 1-thread in sequence on the same repo, so 16-threads was repacking what was repacked by the 36-threads, and 1-thread was repacking what was repacked by the 16-threads. I assumed it didn't matter, but come to think of it, I guess it can.

Mike
Previous: Jeff KingNext: Mike Hommey
Message 10 of 11 in “Surprising use of memory and time when repacking mozilla's gecko repository”
  1. Mike HommeyJul 4, 2019
  2. Eric WongJul 4, 2019
  3. Mike HommeyJul 4, 2019
  4. Jeff KingJul 5, 2019
  5. Mike HommeyJul 5, 2019
  6. Jakub NarebskiJul 5, 2019
  7. Mike HommeyJul 5, 2019
  8. Mike HommeyJul 5, 2019
  9. Jeff KingJul 5, 2019
  10. Mike HommeyJul 5, 2019
  11. Mike HommeyJul 5, 2019

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.