Skip to content
Snippets Groups Projects
Commit 045144ad authored by Jens Larsson's avatar Jens Larsson Committed by Hans Persson
Browse files

Modify TCP tuning settings in the networking module.


Signed-off-by: default avatarHans Persson <hans@nsc.liu.se>
parent 0199f570
Branches
No related tags found
No related merge requests found
...@@ -2,13 +2,18 @@ class networking::tcptuning::if10g ...@@ -2,13 +2,18 @@ class networking::tcptuning::if10g
{ {
sysctl { sysctl {
# Increase TCP max buffer size settable using setsockopt(). # Increase TCP max buffer size settable using setsockopt().
#
# Bandwidth-in-bits-per-second * Round-trip-latency-in-seconds / 8 = # Bandwidth-in-bits-per-second * Round-trip-latency-in-seconds / 8 =
# TCP window size in bytes = 10000000000 * 60 / 8 = 75000000000 # TCP window size in bytes
'net.core.rmem_max': value => '75000000'; #
'net.core.wmem_max': value => '75000000'; # Calculate for 1Gbps and 30ms roundtrip time according to ping:
# 10000000000 * 0.030 / 8 = 37500000
#
'net.core.rmem_max': value => '37500000';
'net.core.wmem_max': value => '37500000';
# Increase Linux autotuning TCP buffer limit. # Increase Linux autotuning TCP buffer limit.
'net.ipv4.tcp_rmem': value => '4096 87380 75000000'; 'net.ipv4.tcp_rmem': value => '4096 87380 37500000';
'net.ipv4.tcp_wmem': value => '4096 87380 75000000'; 'net.ipv4.tcp_wmem': value => '4096 87380 37500000';
# Increase the length of the processor input queue. # Increase the length of the processor input queue.
'net.core.netdev_max_backlog': value => '30000'; 'net.core.netdev_max_backlog': value => '30000';
} }
......
...@@ -2,13 +2,18 @@ class networking::tcptuning::if1g ...@@ -2,13 +2,18 @@ class networking::tcptuning::if1g
{ {
sysctl { sysctl {
# Increase TCP max buffer size settable using setsockopt(). # Increase TCP max buffer size settable using setsockopt().
#
# Bandwidth-in-bits-per-second * Round-trip-latency-in-seconds / 8 = # Bandwidth-in-bits-per-second * Round-trip-latency-in-seconds / 8 =
# TCP window size in bytes = 1000000000 * 60 / 8 = 7500000000 # TCP window size in bytes
'net.core.rmem_max': value => '7500000'; #
'net.core.wmem_max': value => '7500000'; # Calculate for 1Gbps and 30ms roundtrip time according to ping:
# 1000000000 * 0.030 / 8 = 3750000
#
'net.core.rmem_max': value => '3750000';
'net.core.wmem_max': value => '3750000';
# Increase Linux autotuning TCP buffer limit. # Increase Linux autotuning TCP buffer limit.
'net.ipv4.tcp_rmem': value => '4096 87380 7500000'; 'net.ipv4.tcp_rmem': value => '4096 87380 3750000';
'net.ipv4.tcp_wmem': value => '4096 87380 7500000'; 'net.ipv4.tcp_wmem': value => '4096 87380 3750000';
# Increase the length of the processor input queue. # Increase the length of the processor input queue.
'net.core.netdev_max_backlog': value => '30000'; 'net.core.netdev_max_backlog': value => '30000';
} }
......
...@@ -2,13 +2,18 @@ class networking::tcptuning::if40g ...@@ -2,13 +2,18 @@ class networking::tcptuning::if40g
{ {
sysctl { sysctl {
# Increase TCP max buffer size settable using setsockopt(). # Increase TCP max buffer size settable using setsockopt().
#
# Bandwidth-in-bits-per-second * Round-trip-latency-in-seconds / 8 = # Bandwidth-in-bits-per-second * Round-trip-latency-in-seconds / 8 =
# TCP window size in bytes = 10000000000 * 60 / 8 = 75000000000 # TCP window size in bytes
'net.core.rmem_max': value => '75000000'; #
'net.core.wmem_max': value => '75000000'; # Calculate for 40Gbps and 30ms roundtrip time according to ping:
# 40000000000 * 0.030 / 8 = 150000000
#
'net.core.rmem_max': value => '150000000';
'net.core.wmem_max': value => '150000000';
# Increase Linux autotuning TCP buffer limit. # Increase Linux autotuning TCP buffer limit.
'net.ipv4.tcp_rmem': value => '4096 87380 75000000'; 'net.ipv4.tcp_rmem': value => '4096 87380 150000000';
'net.ipv4.tcp_wmem': value => '4096 87380 75000000'; 'net.ipv4.tcp_wmem': value => '4096 87380 150000000';
# Increase the length of the processor input queue. # Increase the length of the processor input queue.
'net.core.netdev_max_backlog': value => '30000'; 'net.core.netdev_max_backlog': value => '30000';
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment