Skip to content

Instantly share code, notes, and snippets.

@hekmon
Last active June 26, 2022 19:55
Show Gist options
  • Save hekmon/78b30ae8cb76b076d01bddaf79b2c693 to your computer and use it in GitHub Desktop.
Save hekmon/78b30ae8cb76b076d01bddaf79b2c693 to your computer and use it in GitHub Desktop.
Linux TCP tuning for CIFS over WAN/VPN

TCP Tuning for CIFS over VPN/WAN

If your bandwitch allows it, this will enable stutter free streaming of 4K remuxes over CIFS/VPN/WAN.

Install

sudo wget 'https://gist.github.com/hekmon/78b30ae8cb76b076d01bddaf79b2c693/raw/d063a1bee463745ce2b8ded41475b5d9c179c7b4/sysctl.conf' -O '/etc/sysctl.d/90-CIFS_over_WAN.conf'
sudo sysctl -p

On both ends !

Source

https://www.cyberciti.biz/faq/linux-tcp-tuning/

# CIFS over VPN/WAN
## https://gist.github.com/hekmon/78b30ae8cb76b076d01bddaf79b2c693
net.core.wmem_max = 12582912
net.core.rmem_max = 12582912
net.ipv4.tcp_rmem = 10240 87380 12582912
net.ipv4.tcp_wmem = 10240 87380 12582912
net.ipv4.tcp_window_scaling = 1
net.ipv4.tcp_timestamps = 1
net.ipv4.tcp_sack = 1
net.ipv4.tcp_no_metrics_save = 1
net.core.netdev_max_backlog = 5000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment