Repository navigation
Commit b6d901c
perf(http): size waitress's buffers for Arrow bodies
Waitress's defaults are tuned for small web payloads and are actively
hostile to Arrow: inbuf_overflow (512 KiB) spools a larger request body to
a temp file before the app sees it, outbuf_overflow (1 MiB) does the same
for responses, and recv_bytes (8 KiB) assembles a 6 MiB body from ~800
recv() calls.
A single emitted batch is routinely megabytes, so every one of those
thresholds sits on the hot path. Measured with a 6 MiB batch per tick:
0.81s per scan compressed, 119.9s uncompressed -- a 147x cliff, purely
because the compressed body lands under outbuf_overflow and the plain one
does not. Compression was masking an untuned transport, and a batch large
enough to exceed the threshold *after* compression falls off the same
cliff with no warning.
These are the values vgi_rpc.http.server.serve_http already uses for this
exact reason; the worker serves waitress directly and never inherited them.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent a550612 commit b6d901c
1 file changed
Lines changed: 27 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1623 | 1623 | | |
1624 | 1624 | | |
1625 | 1625 | | |
| 1626 | + | |
| 1627 | + | |
| 1628 | + | |
| 1629 | + | |
| 1630 | + | |
| 1631 | + | |
| 1632 | + | |
| 1633 | + | |
| 1634 | + | |
| 1635 | + | |
| 1636 | + | |
| 1637 | + | |
| 1638 | + | |
| 1639 | + | |
| 1640 | + | |
| 1641 | + | |
| 1642 | + | |
| 1643 | + | |
| 1644 | + | |
| 1645 | + | |
| 1646 | + | |
| 1647 | + | |
| 1648 | + | |
1626 | 1649 | | |
1627 | 1650 | | |
1628 | 1651 | | |
1629 | 1652 | | |
1630 | 1653 | | |
| 1654 | + | |
| 1655 | + | |
| 1656 | + | |
| 1657 | + | |
1631 | 1658 | | |
1632 | 1659 | | |
1633 | 1660 | | |
| |||
0 commit comments