From 563a648fa46ca8fc9558b5928110fdf3ed2c657d Mon Sep 17 00:00:00 2001 From: klzgrad Date: Sun, 18 Aug 2024 11:45:08 +0800 Subject: [PATCH] Updated Performance Tuning (markdown) --- Performance-Tuning.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Performance-Tuning.md b/Performance-Tuning.md index f8cf701..eb362d5 100644 --- a/Performance-Tuning.md +++ b/Performance-Tuning.md @@ -4,7 +4,7 @@ The TCP window limits throughput over high latency links (throughput <= window size / RTT). In Linux kernel, the window sizes are auto-tuned by the congestion control algorithm and limited by the maximum window sizes. The maximum window sizes are calculated from `tcp_rmem`, `tcp_wmem`, and `tcp_adv_win_scale`. Under the default effect of `tcp_adv_win_scale`, receive window = `tcp_rmem` / 2. -The default values of `tcp_rmem` (max) and `tcp_wmem` (max) are calculated from RAM size and always smaller than 6MB and 4MB. Thus the default maximum receive and send windows are 4MB and 2MB, which are enough for most cases but too small for fat links with e.g. 1Gbps bandwidth and >16ms RTT. +The default values of `tcp_rmem` (max) and `tcp_wmem` (max) are calculated from RAM size and always smaller than 6MB and 4MB. Thus the default maximum receive and send windows are 3MB and 2MB, which are enough for most cases but too small for fat links with e.g. 1Gbps bandwidth and >16ms RTT. The window sizes should be tuned to the actual BDP = Link speed * RTT. Example: Assuming 1Gbps link with 256ms RTT, it's a 32MiB maximum window size requiring 64MiB maximum buffer size. Add to sysctl.conf: * (Client only) `net.ipv4.tcp_rmem = 4096 131072 67108864`