r/homelab•
tangobravoyankee

Tuning Ubuntu 14.04 and Windows 2012 R2 for ~130ms latency?

I've got an ownCloud appliance running on Ubuntu 14.04 and a Windows Server 2012 R2 that are separated by ~130ms. How can I get the TCP parameters tuned for decent uploads from the Windows server?

At the defaults I was seeing up to 1.5Mbps. With these tweaks I see 6-11Mbps, but I'd like to get to at least 100Mbps. With iperf I can hit ~300Mbps using an excessively large (512MB) window size.

Ubuntu:

root@owncloud:~# sysctl -p
net.core.rmem_max = 16777216
net.core.wmem_max = 16777216
net.ipv4.tcp_rmem = 4096 67108864 536870912
net.ipv4.tcp_wmem = 4096 67108864 536870912
net.ipv4.tcp_congestion_control = cubic
net.ipv4.tcp_no_metrics_save = 1
net.ipv4.tcp_mtu_probing = 1
net.ipv4.tcp_rfc1337 = 1
net.ipv4.tcp_keepalive_probes = 3
net.ipv4.tcp_window_scaling = 1
net.ipv4.tcp_moderate_rcvbuf = 1
net.ipv4.tcp_sack = 1
net.ipv4.tcp_fack = 1
net.ipv4.tcp_frto = 2
net.ipv4.tcp_max_syn_backlog = 256

Windows:

PS C:\> Get-NetTransportFilter


SettingName       : InternetCustom
Protocol          : TCP
LocalPortStart    : 0
LocalPortEnd      : 65535
RemotePortStart   : 0
RemotePortEnd     : 65535
DestinationPrefix : *



PS C:\> Get-NetTCPSetting -SettingName InternetCustom


SettingName                   : InternetCustom
MinRto(ms)                    : 300
InitialCongestionWindow(MSS)  : 64
CongestionProvider            : CTCP
CwndRestart                   : False
DelayedAckTimeout(ms)         : 350
DelayedAckFrequency           : 2
MemoryPressureProtection      : Disabled
AutoTuningLevelLocal          : Experimental
AutoTuningLevelGroupPolicy    : NotConfigured
AutoTuningLevelEffective      : Local
EcnCapability                 : Enabled
Timestamps                    : Disabled
InitialRto(ms)                : 3000
ScalingHeuristics             : Enabled
DynamicPortRangeStartPort     : 49152
DynamicPortRangeNumberOfPorts : 16384
AutomaticUseCustom            : Enabled
NonSackRttResiliency          : Disabled
ForceWS                       : Disabled
MaxSynRetransmissions         : 8

Posted Feb 22, 2016, 4:09 AM UTC

61
Loading comments…