Document sysctl tuning for QUIC UDP buffer sizes#296
Conversation
Add a note in the devnet section about increasing net.core.rmem_max and net.core.wmem_max to 7 MiB for optimal QUIC performance, with instructions for both bare-metal and Docker environments. Closes #295
🤖 Claude Code ReviewHere is the review: PR #296 — Document sysctl tuning for QUIC UDP buffer sizesOverview: Documentation-only change adding a callout block to Correctness
Potential Issues
Style & Formatting
SummaryOne substantive concern: the Docker Automated review by Claude (Anthropic) · sonnet · custom prompt |
🤖 Codex Code ReviewNo findings. The diff only updates operational documentation in README.md at lines 43-48, adding Linux/Docker UDP buffer guidance for QUIC. There are no code-path changes affecting fork choice, attestation handling, justification/finalization, state transition, XMSS, SSZ, memory safety, or runtime performance beyond the user-facing guidance itself. Residual note: I only reviewed the submitted diff in Automated review by OpenAI Codex · gpt-5.4 · custom prompt |
🤖 Kimi Code ReviewOverview: This PR contains only documentation changes to Issues Found:
Suggestions:
Consensus Impact: None (documentation only). Automated review by Kimi (Moonshot AI) · kimi-k2.5 · custom prompt |
Greptile SummaryThis PR adds a documentation-only callout in the README devnet section explaining how to tune Linux kernel UDP buffer sizes ( Confidence Score: 5/5Safe to merge — documentation-only change with accurate values and no code impact. All findings are P2 style suggestions (missing sysctl -p step, Docker Compose vs docker run distinction). No code is changed and the documented sysctl values are numerically correct. No files require special attention.
|
| Filename | Overview |
|---|---|
| README.md | Adds a callout block documenting sysctl tuning for QUIC UDP buffer sizes; values are correct (7 MiB = 7,340,032 bytes) and placement is appropriate. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[QUIC socket created] --> B{SO_RCVBUF request ~7 MiB}
B -->|Linux default rmem_max ~208 KiB| C[Kernel caps buffer → warning logged]
B -->|rmem_max=7340032 tuned| D[Full 7 MiB buffer granted]
C --> E[Degraded UDP throughput under load]
D --> F[Optimal QUIC performance]
G[Tuning options] --> H[Transient: sudo sysctl -w]
G --> I[Persistent: /etc/sysctl.conf]
G --> J[Docker: --sysctl flag]
H & I & J --> D
Prompt To Fix All With AI
This is a comment left during a code review.
Path: README.md
Line: 48
Comment:
**`/etc/sysctl.conf` note omits apply-without-reboot step**
The note says "add to `/etc/sysctl.conf`" but doesn't show what to write or how to activate it without rebooting. Users will likely need to run `sudo sysctl -p` to apply immediately. A self-contained example would be clearer:
```suggestion
> To persist across reboots, add the following lines to `/etc/sysctl.conf` and run `sudo sysctl -p` to apply without rebooting. For Docker, pass `--sysctl net.core.rmem_max=7340032 --sysctl net.core.wmem_max=7340032`.
```
How can I resolve this? If you propose a fix, please make it concise.
---
This is a comment left during a code review.
Path: README.md
Line: 43-48
Comment:
**Docker `--sysctl` flag not applicable to Compose-based devnet**
`make run-devnet` uses `lean-quickstart`, which is Docker Compose based. The `--sysctl` flag shown applies to `docker run`; for Compose deployments the equivalent is a `sysctls:` key in the service definition. Users trying to apply this hint to the devnet may be confused. Consider clarifying that the Docker note applies to standalone `docker run` invocations, or point to modifying the Compose file for the devnet case.
How can I resolve this? If you propose a fix, please make it concise.Reviews (1): Last reviewed commit: "Document sysctl tuning for QUIC UDP rece..." | Re-trigger Greptile
| > sudo sysctl -w net.core.rmem_max=7340032 | ||
| > sudo sysctl -w net.core.wmem_max=7340032 | ||
| > ``` | ||
| > To persist across reboots, add to `/etc/sysctl.conf`. For Docker, pass `--sysctl net.core.rmem_max=7340032 --sysctl net.core.wmem_max=7340032`. |
There was a problem hiding this comment.
/etc/sysctl.conf note omits apply-without-reboot step
The note says "add to /etc/sysctl.conf" but doesn't show what to write or how to activate it without rebooting. Users will likely need to run sudo sysctl -p to apply immediately. A self-contained example would be clearer:
| > To persist across reboots, add to `/etc/sysctl.conf`. For Docker, pass `--sysctl net.core.rmem_max=7340032 --sysctl net.core.wmem_max=7340032`. | |
| > To persist across reboots, add the following lines to `/etc/sysctl.conf` and run `sudo sysctl -p` to apply without rebooting. For Docker, pass `--sysctl net.core.rmem_max=7340032 --sysctl net.core.wmem_max=7340032`. |
Prompt To Fix With AI
This is a comment left during a code review.
Path: README.md
Line: 48
Comment:
**`/etc/sysctl.conf` note omits apply-without-reboot step**
The note says "add to `/etc/sysctl.conf`" but doesn't show what to write or how to activate it without rebooting. Users will likely need to run `sudo sysctl -p` to apply immediately. A self-contained example would be clearer:
```suggestion
> To persist across reboots, add the following lines to `/etc/sysctl.conf` and run `sudo sysctl -p` to apply without rebooting. For Docker, pass `--sysctl net.core.rmem_max=7340032 --sysctl net.core.wmem_max=7340032`.
```
How can I resolve this? If you propose a fix, please make it concise.| > **Note:** On Linux, QUIC performance benefits from larger UDP receive buffers. If you see warnings about buffer sizes, increase the kernel limit: | ||
| > ```sh | ||
| > sudo sysctl -w net.core.rmem_max=7340032 | ||
| > sudo sysctl -w net.core.wmem_max=7340032 | ||
| > ``` | ||
| > To persist across reboots, add to `/etc/sysctl.conf`. For Docker, pass `--sysctl net.core.rmem_max=7340032 --sysctl net.core.wmem_max=7340032`. |
There was a problem hiding this comment.
Docker
--sysctl flag not applicable to Compose-based devnet
make run-devnet uses lean-quickstart, which is Docker Compose based. The --sysctl flag shown applies to docker run; for Compose deployments the equivalent is a sysctls: key in the service definition. Users trying to apply this hint to the devnet may be confused. Consider clarifying that the Docker note applies to standalone docker run invocations, or point to modifying the Compose file for the devnet case.
Prompt To Fix With AI
This is a comment left during a code review.
Path: README.md
Line: 43-48
Comment:
**Docker `--sysctl` flag not applicable to Compose-based devnet**
`make run-devnet` uses `lean-quickstart`, which is Docker Compose based. The `--sysctl` flag shown applies to `docker run`; for Compose deployments the equivalent is a `sysctls:` key in the service definition. Users trying to apply this hint to the devnet may be confused. Consider clarifying that the Docker note applies to standalone `docker run` invocations, or point to modifying the Compose file for the devnet case.
How can I resolve this? If you propose a fix, please make it concise.
Motivation
Fixes #295. QUIC clients (both Rust/quinn and Go/quic-go) request ~7 MiB UDP receive buffers from the OS, but Linux defaults cap
SO_RCVBUFat ~208 KiB. This causes warnings and can degrade networking performance under load.The underlying
SO_RCVBUF/SO_SNDBUFsocket options aren't configurable through the libp2p/quinn API chain — they require OS-level sysctl tuning.Description
Adds a note in the README devnet section documenting:
net.core.rmem_maxandnet.core.wmem_maxsysctl settings (7 MiB)/etc/sysctl.conf)--sysctlflags for containerized deploymentsHow to Test
Documentation-only change — verify the README renders correctly.
Closes
Closes #295