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

Re: [PATCH 1/1] upload-pack.c: make output buffer size configurable

From
Jacob Vosmaer <jacob@gitlab.com>
Date
Dec 14, 2021, 20:04 UTC
Message-ID
<CADMWQoOaPQaCQa5V+1Dujc6A=+f8rnv7MG+fP1mZi1kwm=d3fQ@mail.gmail.com>
In-Reply-To
<Ybi6SwndUHLs27bO@coredump.intra.peff.net>
On Tue, Dec 14, 2021 at 4:37 PM Jeff King <peff@peff.net> wrote:
Show 10 quoted lines
>
> It gets about 2.3GB/s with the tip of 'master' and 3.2GB/s with the
> equivalent of your patch (using LARGE_PACKET_DATA_MAX). So definitely an
> improvement.
>
> Without the cached case (so actually running pack-objects, albeit a
> pretty quick one because of bitmaps and pack-reuse), the timings are
> about the same (171MB/s versus 174MB/s, but really it's just pegging a
> CPU running pack-objects). So it would be fine to just do this
> unconditionally, I think.
Thank you for validating this!
Show 5 quoted lines
> Looking at strace, the other thing I notice is that we write() the
> packet header separately in send_sideband(), which doubles the number of
> syscalls. I hackily re-wrote this to use writev() instead (patch below),
> but it doesn't seem to actually help much (maybe a curiosity to explore
> further, but definitely not something to hold up your patch).

Those double writes bug me too. Getting rid of them was one of the things I liked about using stdio here. Curious now if writev will make an impact in my benchmarks. As your experiments indicate, the double writes may not be a problem in real life. Either way, I also feel it is not something to rope into this patch set.

Previous: Jeff KingNext: Jeff King
Message 16 of 17 in “Make upload-pack pack write size configurable”
  1. 0/1 Make upload-pack pack write size configurableJacob Vosmaer, Dec 13, 2021
  2. 1/1 upload-pack.c: make output buffer size configurableJacob Vosmaer, Dec 13, 2021
  3. Ævar Arnfjörð BjarmasonDec 14, 2021
  4. Jeff KingDec 14, 2021
  5. 0/1 upload-pack.c: increase output buffer sizeJacob Vosmaer, Dec 14, 2021
  6. 1/1 upload-pack.c: increase output buffer sizeJacob Vosmaer, Dec 14, 2021
  7. Ævar Arnfjörð BjarmasonDec 14, 2021
  8. Jeff KingDec 15, 2021
  9. Junio C HamanoDec 15, 2021
  10. rsbecker@nexbridge.comDec 15, 2021
  11. Jacob VosmaerDec 15, 2021
  12. rsbecker@nexbridge.comDec 15, 2021
  13. Jacob VosmaerDec 15, 2021
  14. rsbecker@nexbridge.comDec 15, 2021
  15. Jeff KingDec 14, 2021
  16. Jacob VosmaerDec 14, 2021
  17. Jeff KingDec 14, 2021

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.