When the window is not fully open, your TCP stack is doing more than you think
Jul 26, 2022Marek Majkowski

Summary
This post delves into the complex memory and window management of the TCP receiving side within the Linux kernel. It clarifies how Linux manages TCP receive buffers and windows, answering questions about the actual capacity of receive buffers and the speed at which they can be filled. The post explains the concepts of skmem_rb, recv-q, skmem_r, and the advertised window, detailing how settings like tcp_adv_win_scale influence performance. It highlights the critical issue of exceeding memory budgets, leading to packet drops and performance degradation, and discusses the roles of TCP Coalesce and TCP Collapse in mitigating these problems.
More from the Data Infrastructure & Analytics trail
- Introducing Cloudflare Basin: an open, serverless data platform, now generally available
- Introducing the Billable Usage API: programmatic cost visibility for Cloudflare
- Announcing the Monetization Gateway: charge for any resource behind Cloudflare via x402
- How we built Cloudflare's data platform and an AI agent on top of it
- Iran's Internet is partially restored, Cloudflare Radar data shows