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

Re: reftable: new ref storage format

From
Jeff King <peff@peff.net>
Date
Jul 14, 2017, 20:10 UTC
Message-ID
<20170714201040.hwrr5gwrc23lp3jt@sigill.intra.peff.net>
In-Reply-To
<CAJo=hJv7kaT3m6k1nz1-tGuVAMmgnrS0dcfycGfE3PyXjG3xRA@mail.gmail.com>
On Thu, Jul 13, 2017 at 05:27:44PM -0700, Shawn Pearce wrote:
Show 14 quoted lines
> > We _could_ consider gzipping individual blocks of
> > a reftable (or any structure that allows you to search to a
> > constant-sized block and do a linear search from there). But given that
> > they're in the same ballpark, I'm happy with whatever ends up the
> > simplest to code and debug. ;)
> 
> This does help to shrink the file, e.g. it drops from 28M to 23M.
> 
> It makes it more CPU costly to access a block, as we have to inflate
> that to walk through the records. It also messes with alignment. When
> you touch a block, that may be straddling two virtual memory pages in
> your kernel/filesystem.
> 
> I'm not sure those penalties are worth the additional 16% reduction in size.

Yeah, I don't really care about a 16% reduction in size. I care much more about simplicity of implementation and debugging. Using zlib is kind-of simple to implement. But if you've ever had to debug it (or figure out what is going on with maybe-corrupted output), it's pretty nasty.

So I don't mind a more readable custom compression if it's not too complicated. And especially if it buys us extra performance by being able to jump around non-sequentially in the block.

-Peff
Previous: Shawn PearceNext: Shawn Pearce
Message 7 of 25 in “reftable: new ref storage format”
  1. Shawn PearceJul 13, 2017
  2. Jeff KingJul 13, 2017
  3. Stefan BellerJul 13, 2017
  4. Jeff KingJul 13, 2017
  5. Eric WongJul 13, 2017
  6. Shawn PearceJul 14, 2017
  7. Jeff KingJul 14, 2017
  8. Shawn PearceJul 14, 2017
  9. Dave BorowitzJul 14, 2017
  10. Shawn PearceJul 14, 2017
  11. Jeff KingJul 14, 2017
  12. Shawn PearceJul 16, 2017
  13. Jeff KingJul 16, 2017
  14. Johannes SixtJul 16, 2017
  15. Jeff KingJul 16, 2017
  16. Johannes SixtJul 16, 2017
  17. Michael HaggertyJul 16, 2017
  18. Shawn PearceJul 16, 2017
  19. Shawn PearceJul 16, 2017
  20. Dave BorowitzJul 16, 2017
  21. Shawn PearceJul 16, 2017
  22. Michael HaggertyJul 18, 2017
  23. Junio C HamanoJul 18, 2017
  24. Shawn PearceJul 23, 2017
  25. Shawn PearceJul 23, 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.