Tune high-speed networks for faster transfers
Mon, Jun 19 2006 at 7:30AM PDT • Contributed by: Anonymous
Mon, Jun 19 2006 at 7:30AM PDT • Contributed by: Anonymous
Here's a little blurb from an article I found on the internet regarding OS performance tuning, written by the Pittsburgh Supercomputing Center. Note that this only really helps on data transfers on gigabit ethernet networks, though it might help latency on 100 megabit networks.
The steps:
In my testing across a gigabit Ethernet network using an OS X Server with 1.5GB of RAM and two mirrored disks, I can move about 40 megabytes a second. Previously, I obtained about 15 megabytes a second. If you are on a 100 megabit network, your max bandwidth is 10 megabytes a second, so you won't see the increase.
Mac OS X has a single sysctl parameter, kern.ipc.maxsockbuf, to set the maximum combined buffer size for both sides of a TCP (or other) socket. In general, it can be set to at least twice the BDP. E.g:Read on for more detailed instructions on how to use this on your Mac.The default send and receive buffer sizes can be set using the following sysctl variables:sysctl -w kern.ipc.maxsockbuf=8000000If you would like these changes to be preserved across reboots you can edit /etc/sysctl.conf.sysctl -w net.inet.tcp.sendspace=4000000 sysctl -w net.inet.tcp.recvspace=4000000
The steps:
- Benchmark your connection either at a site from the article or a local fileserver, and note the data transfer speed.
- Try the transfer again. If its cached in ram on the server it will be much faster.
- Run the following commands in order, in Terminal. Type each line individually and in order, or else your TCP/IP stack will go dumb. Also, the maxsockbuf must be at least the sum of the send/recv space buffers, or TCP/IP will go dumb.
$ sysctl -w kern.ipc.maxsockbuf=8000000 $ sysctl -w net.inet.tcp.sendspace=4000000 $ sysctl -w net.inet.tcp.recvspace=4000000 - Run your benchmark test again.
In my testing across a gigabit Ethernet network using an OS X Server with 1.5GB of RAM and two mirrored disks, I can move about 40 megabytes a second. Previously, I obtained about 15 megabytes a second. If you are on a 100 megabit network, your max bandwidth is 10 megabytes a second, so you won't see the increase.
•
[30,196 views]
