Zhidaily AI · Intelligence · Daily
Zhidaily
Issue 32 · December 1, 2026 · Tue
Today's stories
10 stories · 10 companies
Home / December 1, 2026 / CDN77 Traces Random nginx Slowdowns to a Hidden Linux Kernel Throttle
← Back
News CDN77 Score72

CDN77 Traces Random nginx Slowdowns to a Hidden Linux Kernel Throttle

In brief
A CDN operator chased random, self-healing download slowdowns to a Linux kernel memory-pressure check that throttles every socket in a cgroup. The fix is a boot flag; a proper patch is still coming.
Hacker News josefinaspidlen · Hacker News · cdn77.com
Nov 30 · 21:15 Read the original ↗
01Summary

Engineers at CDN77, a content delivery network, traced intermittent download slowdowns on edge servers to a Linux kernel mechanism that throttles all sockets in a cgroup (a group of processes sharing resource limits) when memory reclaim falls short. The slowdowns hit only nginx processes on cache misses, lasted hours, and cleared on their own or after a reboot. The cause: the kernel's vmpressure code samples a roughly 2 MB window of page reclaim, and if it frees less than about 40% of what it scanned, it sets a per-cgroup flag that shrinks socket buffers for at least one second. Free RAM on the machine plays no part, so a cache-heavy server with hundreds of gigabytes free can still trip it. CDN77's workaround was moving nginx into the root cgroup, which the check skips; it also contributed a sock_throttled counter to the memory.events file, available since Linux 6.19. A proper upstream fix has not landed yet.

02Why cgroups matter here

Linux cgroups let a service be placed in its own resource bucket, and systemd does this by default for every service, including nginx. When the memory controller is loaded, the kernel also tracks socket memory against that bucket, which is what made a per-cgroup memory-reclaim shortfall able to throttle every connection a process owns. Before Linux 6.19 there was no counter for this throttling, so operators had no direct way to see it happening.

03What Operators Should Check

Anyone running nginx or another high-throughput service under systemd with the cgroup memory controller loaded can hit this without any memory limit set. Two things help now: check memory.events for sock_throttled on Linux 6.19 or later to confirm the throttle is happening, and consider the cgroup.memory=nosocket boot parameter, which stops socket memory from counting toward the cgroup limit. Moving the service to the root cgroup also avoids the check, but gives up cgroup memory isolation.

04From the Comments

Commenters welcomed the write-up as a rare concrete walkthrough of Linux networking internals. One reader questioned why reclaim efficiency alone triggers pressure regardless of free memory, and another pointed to cgroup.memory=nosocket as the current workaround, noting socket memory is usually negligible against the limit. A third warned that the cgroup memory controller also charges filesystem caches, which can degrade performance well before an app is killed.