Performance & eBPF
Network buffer tuning
TCP buffers cap how much data a connection can have in flight, so the window and the round-trip time set the rate. Size them from bandwidth times round-trip time, then test the change on one host.
What you will be able to do
- Explain how the bandwidth-delay product sets the receive window a link needs.
- Decide which hosts need a buffer change, and measure its effect before rolling it out.
What is in the lesson
- A real situation where this goes wrong
- How it works, step by step
- A walkthrough with commands you can run
- How it fails in production, and how to tell
- Three quiz questions with explanations
Read this lessonFree. No account needed.
More in Performance & eBPF
- Disk latencyBeginner · 4 min
Disk latency is queueing time plus service time, and iostat's await shows both. Utilization alone does not show how much more work a device can take.
- IOPS throughputBeginner · 4 min
IOPS and throughput are linked by I/O size, so the lower of the two caps decides the speed. Test with the workload's real I/O size, not a small-block benchmark at queue…
- TCP backlogBeginner · 4 min
The listen backlog sets the accept queue for a listening socket, capped by the system somaxconn value. A full queue usually means the application accepts too slowly…
- File descriptor exhaustionBeginner · 5 min
Each open file, socket or pipe takes a descriptor from a per-process limit. A count that climbs with requests points to a leak, and a higher limit only delays the…
- Lock contentionIntermediate · 4 min
A contended lock makes threads sleep on a futex, so CPU can look low while throughput is capped. The length of the locked section sets the ceiling, and adding threads…
- Cache localityIntermediate · 4 min
Cache lines move between RAM and the CPU in fixed blocks, so the order of memory access changes the miss rate. Hardware counters show the cost, and false sharing can…