Unbounded memory usage by Linux TCP for receive buffers, and how we fixed it
blog.cloudflare.com
blog.cloudflare.com
Makes me worried about QUIC and how long it will take to build up the same level of rigor as TCP stacks, plus all the other fancy features. And who’s going to maintain std lib for every popular language? Heck many of them don’t even provide HTTP or recent TLS versions.
They’ve just started building a QUIC stack in Go (std) and the excellent community project quic-go is something like 8y in with 70kLOC (although mostly tests). And there are still important perf improvements missing.
Having TCP provided by the kernel is something I’ve come to appreciate more and more. Plus the kernel can divide up resources and schedule based on information that simply doesn’t exist in user-space.
Set to land in v6.4: https://lore.kernel.org/linux-mm/20230330191801.1967435-1-yo...
To see if you are affected run ‘sudo perf top’ and see if ‘blkcg_rstat_flush()’ shows up.
blkcg_rstat_flush is quite slow on some kernels and it disables IRQs on the cpu which blocks nic queues on the same CPU.
The one thing I was hoping to see but didn’t: how long has this been broken? Has it been broken since coalescing was added? Or was it a regression introduced by some other patch 2 years ago, or what?
They said they started noticing this recently. Is that due to its introduction? Or has something else changed (configuration, tuning, the traffic passing through) that is causing this far more than it used to?
The before/after graphs are impressive.
Thanks Cloudflare falks