Clones yield to pages
Pages and git packs leave through the same uplink, so a large clone could starve every page (#13778).
- Pacing (
src/git/pace.ts): while a page request is open, or one began or ended in the last 3 seconds, agit-upload-packresponse is sent atFORGE_PACK_PACED_BPSbytes a second (default 131072, about 1 Mbit/s). A value that is not a finite number above zero is ignored and the default is used. With no page traffic a clone gets the whole line: there is no fixed cap. An open request older than 20 seconds (a held stream) is not a page, and a request to/:owner/:name.git/…is a transfer, not a page. Pushes are not paced. - Only the line: a request from this machine that names no client (the forge's crew cloning its own repositories over loopback, the forge asking itself) never crosses the uplink, so its fetch is not paced and it is not a page (#14605). Pacing the crew's loopback clones held a 23 MB shallow clone to 181 s, past the crew's clone limit.
- Stalls and slots: a paced pack moves far faster than the stall floor (16 KiB in 30 s,
src/git/progress.ts), so pacing alone never ends a transfer as a stall. It does hold its git process and transfer slot longer while pages are open, and the two-hour cap still ends a pack that would need longer than that at the paced rate. The slot limit is unchanged. - The line is said on /flow and in the terminal's Flow screen: "Git packs are being slowed so pages go first." for a minute after a pack was paced.
- Smaller clones: upload-pack already honours partial clone (
git clone --filter=blob:none) and shallow fetches (--depth); use them. - Not done: SSH transfers are not paced; the rate is a setting, not measured from the uplink (#13712). Crawler and media pacing,
robots.txtand/streamfor crawlers are separate changes.