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

Re: Strategy to deal with slow cloners

From
EWEric Wong <e@80x24.org>
Date
Apr 19, 2021, 18:08 UTC
Message-ID
<20210419180803.GA10171@dcvr>
In-Reply-To
<20210419124623.wwps2s35x2mrrhi6@nitro.local>
Konstantin Ryabitsev <konstantin@linuxfoundation.org> wrote:
Show 7 quoted lines
> Hello:
> 
> I try to keep repositories routinely repacked and optimized for clones, in
> hopes that most operations needing lots of objects would be sending packs
> straight from disk. However, every now and again a client from a slow
> connection requests a large clone and then takes half a day downloading it,
> resulting in gigabytes of RAM being occupied by a temporary pack.
Yeah, I'm familiar with the problem.
> Are there any strategies to reduce RAM usage in such cases, other than
> vm.swappiness (which I'm not sure would work, since it's not a sleeping
> process)? Is there a way to write large temporary packs somewhere to disk
> before sendfile'ing them?

public-inbox-httpd actually switched buffering strategies in 2019 to favor hitting ENOSPC instead of ENOMEM :)

  https://public-inbox.org/meta/20190629195951.32160-11-e@80x24.org/

It doesn't support sendfile, currently (I didn't want separate HTTPS vs HTTP code paths), but that's probably not too big of a deal, especially with slow clients.

It's capable of serving non-public-inbox coderepos (and running cgit). Instead of configuring every [coderepo "..."] manually, publicinbox.cgitrc can be set in ~/.public-inbox/config to mass-configure [coderepo] sections. It's only lightly-tested for my setup atm, though.

Mapping publicinbox.<name>.coderepo to [coderepo "..."] entries for solver (blob reconstruction) isn't required; it's a bit of a pain at a large scale and I haven't figured out how to make it easier.

Previous: Konstantin RyabitsevNext: Eric Wong
Message 2 of 6 in “Strategy to deal with slow cloners”
  1. Konstantin RyabitsevApr 19, 2021
  2. Eric WongApr 19, 2021
  3. Eric WongApr 21, 2021
  4. Thomas BraunApr 20, 2021
  5. Ævar Arnfjörð BjarmasonApr 22, 2021
  6. Jeff KingApr 23, 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.