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

Re: [PATCH v1 1/4] fastindex: speed up index load through parallelization

From
Jeff King <peff@peff.net>
Date
Nov 20, 2017, 14:20 UTC
Message-ID
<20171120142035.bfwu24oegw27ucs3@sigill.intra.peff.net>
In-Reply-To
<92b0b0ff-6878-003a-b26f-3b4c2c857be3@gmail.com>
On Mon, Nov 20, 2017 at 09:01:45AM -0500, Ben Peart wrote:
> Further testing has revealed that switching from the regular heap to a
> refactored version of the mem_pool in fast-import.c produces similar gains
> as parallelizing do_index_load().  This appears to be a much simpler patch
> for similar gains so we will be pursuing that path.

That sounds like a pretty easy win for index entries, which tend to stick around in big clumps.

Out of curiosity, have you tried experimenting with any high-performance 3rd-party allocator libraries? I've often wondered if we could get a performance improvement from dropping in a new allocator, but was never able to measure any real benefit over glibc's ptmalloc2. The situation might be different on Windows, though (i.e., if the libc allocator isn't that great).

Most of the high-performance allocators are focused on concurrency, which usually isn't a big deal for git. But tcmalloc, at least, claims to be about 6x faster than glibc.

The reason I ask is that we could possibly get the same wins without writing a single line of code. And it could apply across the whole code-base, not just the index code. I don't know how close a general purpose allocator could come to a pooled implementation, though. You're inherently making a tradeoff with a pool in not being able to free individual entries.

-Peff
Previous: Ben PeartNext: Jeff King
Message 13 of 19 in “Speed up index load through parallelization”
  1. 0/4 Speed up index load through parallelizationBen Peart, Nov 9, 2017
  2. 1/4 fastindex: speed up index load through parallelizationBen Peart, Nov 9, 2017
  3. Junio C HamanoNov 10, 2017
  4. Ben PeartNov 13, 2017
  5. Junio C HamanoNov 14, 2017
  6. Ben PeartNov 14, 2017
  7. Junio C HamanoNov 14, 2017
  8. Ben PeartNov 14, 2017
  9. Junio C HamanoNov 15, 2017
  10. Ben PeartNov 15, 2017
  11. Junio C HamanoNov 15, 2017
  12. Ben PeartNov 20, 2017
  13. Jeff KingNov 20, 2017
  14. Jeff KingNov 20, 2017
  15. Ramsay JonesNov 20, 2017
  16. Ben PeartNov 21, 2017
  17. 2/4 update-index: add fastindex support to update-indexBen Peart, Nov 9, 2017
  18. 3/4 fastindex: add test tools and a test scriptBen Peart, Nov 9, 2017
  19. 4/4 fastindex: add documentation for the fastindex extensionBen Peart, Nov 9, 2017

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.