From fb0d20f12393eb57a9f322bdc1391f7e25b6d494 Mon Sep 17 00:00:00 2001 From: JackDoan Date: Mon, 27 Jul 2026 15:51:42 -0500 Subject: [PATCH] docs: note the GRO receive-scratch memory cost of listen.batch The TX arena (128 x 9033B per routine) and GRO receive scratch (listen.batch x 64KiB per socket) stay at their worst-case bounds by design: the arena never grows past real demand and the GRO slots cannot be smaller without truncating coalesced superpackets. Document the listen.batch knob's memory implication so constrained hosts know what to tune. Co-Authored-By: Claude Fable 5 --- examples/config.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/config.yml b/examples/config.yml index b9e96235..bd46c427 100644 --- a/examples/config.yml +++ b/examples/config.yml @@ -131,6 +131,9 @@ listen: port: 4242 # Sets the max number of packets to pull from the kernel for each syscall (under systems that support recvmmsg) # default is 64, does not support reload + # Note: on Linux with UDP GRO (kernel 5.10+), each receive slot is sized for a full 64KiB coalesced + # superpacket, so the receive scratch is batch * 64KiB per listening socket (~4MiB per routine at the + # default of 64). Lower this to trade peak per-syscall throughput for memory on constrained hosts. #batch: 64 # Configure socket buffers for the udp side (outside), leave unset to use the system defaults. Values will be doubled by the kernel # Default is net.core.rmem_default and net.core.wmem_default (/proc/sys/net/core/rmem_default and /proc/sys/net/core/rmem_default)