Uncovering Hidden TCP Throttling in the Linux Kernel
Web page · https://cdn77.com/blog/debugging-nginx-linux-contribution
First seen by Oriel on .
AI summary
CDN77 traces intermittent nginx download throttling to cgroup memory-pressure signaling, which shrinks socket buffers even when global TCP pressure counters are zero.
- The issue affected nginx cache-miss connections, while direct curl downloads worked; rebooting temporarily restored normal throughput.
- tcp_under_memory_pressure() checks both global TCP pressure and socket cgroup pressure, explaining why SNMP counters showed no pressure.
- A reclaim-efficiency check over a 2 MB window can mark a cgroup pressured when fewer than about 40% of scanned pages are freed, regardless of total free RAM.
- The temporary workaround moved nginx into the root cgroup, where vmpressure() returns without setting socket pressure.
- CDN77 contributed a Linux 6.19 memory.events counter named sock_throttled to expose sockets throttled by this mechanism.
#linux kernel #tcp #cgroups #nginx
Generated by gpt-5.6-sol. Check the original for details.
Metric trends
Last 30 days · Up to 120 recorded samples per source and metric, with reposts kept separate · First and latest retained
Points
Score reported by the source.
- Hacker News: 400, latest observation ; +382 over observed period since
- Lobsters: 45, latest observation ; +44 over observed period since
Comments
Comment count reported by the source.
- Hacker News: 48, latest observation ; +48 over observed period since
- Lobsters: 2, latest observation ; +2 over observed period since
Aliases
| Source | External ID | URL |
|---|---|---|
| Hacker News | 50699391 | https://www.cdn77.com/blog/debugging-nginx-linux-contribution Read discussion |
| Lobsters | 5tvkbt | https://www.cdn77.com/blog/debugging-nginx-linux-contribution Read discussion |