Difference between revisions of "Network Tweaks"

From AwkwardTV
Jump to: navigation, search
m (New page: Pop this into your /etc/sysctl.conf and reboot kern.ipc.somaxconn=512 net.inet.tcp.mssdflt=1460 net.inet.tcp.sendspace=98304 net.inet.tcp.recvspace=98304 kern.ipc.maxsockbuf=1048576 ...)
 
(Added notes on how to apply the kernel changes without a reboot.)
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
Pop this into your /etc/sysctl.conf and reboot
+
Pop this into your /etc/[[Sysctl output|sysctl.conf]] and reboot
  
 
  kern.ipc.somaxconn=512
 
  kern.ipc.somaxconn=512
Line 16: Line 16:
  
 
[http://devroot.org/2007/05/01/optimize-network-throughput-on-your-appletv/ Via devroot]
 
[http://devroot.org/2007/05/01/optimize-network-throughput-on-your-appletv/ Via devroot]
 +
 +
To initiate the changes into the kernel without a reboot, add the above to /etc/sysctl.conf then issue the following command string:
 +
 +
awk '{ if (!index($1, "#") && index($1, "=")) print $1 }' < /etc/sysctl.conf | while read
 +
do
 +
        sysctl -w ${REPLY}
 +
done
 +
 +
If successful, you should see the following output from sysctl confirming the changes:
 +
 +
kern.ipc.somaxconn: 128 -> 512
 +
net.inet.tcp.mssdflt: 512 -> 1460
 +
net.inet.tcp.sendspace: 32768 -> 98304
 +
net.inet.tcp.recvspace: 32768 -> 98304
 +
kern.ipc.maxsockbuf: 262144 -> 1048576
 +
net.inet.udp.maxdgram: 9216 -> 57344
 +
net.inet.udp.recvspace: 42080 -> 42080
 +
net.local.stream.sendspace: 8192 -> 98304
 +
net.local.stream.recvspace: 8192 -> 98304
 +
net.inet.tcp.delayed_ack: 3 -> 0
 +
net.inet.tcp.rfc1323: 1 -> 1
 +
net.inet.tcp.rfc1644: 0 -> 1
 +
net.inet.tcp.newreno: 0 -> 1
 +
 +
(Taken directly from the applicable portion of /etc/rc, the primary boot script.  While the above Apple
 +
command syntax does not really provide much safeguard, and there are more simple ways to apply the changes via command line, this is the way the ATV does it at every reboot and thus the way promoted here.)
 +
 +
[[Category:Software]][[Category:How-to]]

Latest revision as of 05:28, 20 February 2008

Pop this into your /etc/sysctl.conf and reboot

kern.ipc.somaxconn=512
net.inet.tcp.mssdflt=1460
net.inet.tcp.sendspace=98304
net.inet.tcp.recvspace=98304
kern.ipc.maxsockbuf=1048576
net.inet.udp.maxdgram=57344
net.inet.udp.recvspace=42080
net.local.stream.sendspace=98304
net.local.stream.recvspace=98304
net.inet.tcp.delayed_ack=0
net.inet.tcp.rfc1323=1
net.inet.tcp.rfc1644=1
net.inet.tcp.newreno=1

Via devroot

To initiate the changes into the kernel without a reboot, add the above to /etc/sysctl.conf then issue the following command string:

awk '{ if (!index($1, "#") && index($1, "=")) print $1 }' < /etc/sysctl.conf | while read
do
        sysctl -w ${REPLY}
done

If successful, you should see the following output from sysctl confirming the changes:

kern.ipc.somaxconn: 128 -> 512
net.inet.tcp.mssdflt: 512 -> 1460
net.inet.tcp.sendspace: 32768 -> 98304
net.inet.tcp.recvspace: 32768 -> 98304
kern.ipc.maxsockbuf: 262144 -> 1048576
net.inet.udp.maxdgram: 9216 -> 57344
net.inet.udp.recvspace: 42080 -> 42080
net.local.stream.sendspace: 8192 -> 98304
net.local.stream.recvspace: 8192 -> 98304
net.inet.tcp.delayed_ack: 3 -> 0
net.inet.tcp.rfc1323: 1 -> 1
net.inet.tcp.rfc1644: 0 -> 1
net.inet.tcp.newreno: 0 -> 1

(Taken directly from the applicable portion of /etc/rc, the primary boot script. While the above Apple command syntax does not really provide much safeguard, and there are more simple ways to apply the changes via command line, this is the way the ATV does it at every reboot and thus the way promoted here.)