-
-
Save mthrynn/98e34d4fda5a405b918a6d734ac40977 to your computer and use it in GitHub Desktop.
OSX - Tuning the Network Stack TCP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Quick fix for slow internet after update to OSX 10.11 "El Capitan" | |
## Changes are not permanent, just restart your mac if it doesn't work. | |
## write config | |
sudo su - | |
sysctl -w net.inet.tcp.doautorcvbuf=0 | |
sysctl -w net.inet.tcp.doautosndbuf=0 | |
sysctl -w net.inet.tcp.win_scale_factor=0 | |
sysctl -w kern.ipc.somaxconn=2048 | |
sysctl -w net.inet.tcp.rfc1323=1 | |
sysctl -w net.inet.tcp.win_scale_factor=4 | |
sysctl -w net.inet.tcp.sendspace=1042560 | |
sysctl -w net.inet.tcp.recvspace=1042560 | |
sysctl -w net.inet.tcp.mssdflt=1448 | |
sysctl -w net.inet.tcp.v6mssdflt=1412 | |
sysctl -w net.inet.tcp.msl=15000 | |
sysctl -w net.inet.tcp.always_keepalive=0 | |
sysctl -w net.inet.tcp.delayed_ack=3 | |
sysctl -w net.inet.tcp.slowstart_flightsize=20 | |
sysctl -w net.inet.tcp.local_slowstart_flightsize=9 | |
sysctl -w net.inet.tcp.blackhole=2 | |
sysctl -w net.inet.udp.blackhole=1 | |
sysctl -w net.inet.icmp.icmplim=50 | |
## read config | |
sysctl net.inet.tcp.doautorcvbuf | |
sysctl net.inet.tcp.doautosndbuf | |
sysctl net.inet.tcp.win_scale_factor | |
sysctl kern.ipc.somaxconn | |
sysctl net.inet.tcp.win_scale_factor | |
sysctl net.inet.tcp.sendspace | |
sysctl net.inet.tcp.recvspace | |
sysctl net.inet.tcp.mssdflt | |
sysctl net.inet.tcp.v6mssdflt | |
sysctl net.inet.tcp.msl | |
sysctl net.inet.tcp.always_keepalive | |
sysctl net.inet.tcp.delayed_ack | |
sysctl net.inet.tcp.slowstart_flightsize | |
sysctl net.inet.tcp.local_slowstart_flightsize | |
sysctl net.inet.tcp.blackhole | |
sysctl net.inet.udp.blackhole | |
sysctl net.inet.icmp.icmplim |
how do I make these changes persistent ?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
sysctl -w net.inet.tcp.win_scale_factor=0
then
sysctl -w net.inet.tcp.win_scale_factor=4
I imagine you want the second choice.