Knowledge Base:  
Suggested tuning parameters for a AFP client and AFP Server
Last Updated 9/6/2010
Here are some suggested tuneables we have found to increase AFP
performance between Mac clients and a Mac server.  

-Bring up a Terminal/shell window

-become root user with:

sudo sh

(supply the password...it will not display as you type)

The result should be that the "prompt" changes from
a $ to a #

Copy these lines with your mouse and execute them (right-click/paste)
them into the terminal/shell window you became root on.  The list
of commands are different based on the amount of memory
you have on your system as well as if it is a client or server.

For an AFP server:


For systems with >= 16GBytes of memory,

echo "net.inet.tcp.delayed_ack=2" > /etc/sysctl.conf
echo "kern.maxnbuf=60000" >> /etc/sysctl.conf
echo "kern.maxvnodes=280000" >> /etc/sysctl.conf
echo "net.inet.tcp.sendspace=2097152" >> /etc/sysctl.conf
echo "net.inet.tcp.recvspace=2097152" >> /etc/sysctl.conf
echo "net.inet.tcp.maxseg_unacked=32" >> /etc/sysctl.conf

For systems with >= 8 GBytes of memory:

echo "net.inet.tcp.delayed_ack=2" > /etc/sysctl.conf
echo "kern.maxnbuf=42000" >> /etc/sysctl.conf
echo "kern.maxvnodes=150000" >> /etc/sysctl.conf
echo "net.inet.tcp.sendspace=2097152" >> /etc/sysctl.conf
echo "net.inet.tcp.recvspace=2097152" >> /etc/sysctl.conf
echo "net.inet.tcp.maxseg_unacked=32" >> /etc/sysctl.conf

For systems with >=4 GBytes of memory:

echo "net.inet.tcp.delayed_ack=2" > /etc/sysctl.conf
echo "kern.maxnbuf=60000" >> /etc/sysctl.conf
echo "kern.maxvnodes=280000" >> /etc/sysctl.conf
echo "net.inet.tcp.sendspace=2097152" >> /etc/sysctl.conf
echo "net.inet.tcp.recvspace=2097152" >> /etc/sysctl.conf
echo "net.inet.tcp.maxseg_unacked=32" >> /etc/sysctl.conf

or for systems with < 4GBytes of memory:

echo "net.inet.tcp.delayed_ack=2" > /etc/sysctl.conf
echo "kern.maxvnodes=60000" >> /etc/sysctl.conf
echo "net.inet.tcp.sendspace=2097152" >> /etc/sysctl.conf
echo "net.inet.tcp.recvspace=2097152" >> /etc/sysctl.conf
echo "net.inet.tcp.maxseg_unacked=32" >> /etc/sysctl.conf


For an AFP client:


For systems with >= 16GBytes of memory,

echo "net.inet.tcp.delayed_ack=2" > /etc/sysctl.conf
echo "net.inet.tcp.sendspace=2097152" >> /etc/sysctl.conf
echo "net.inet.tcp.recvspace=2097152" >> /etc/sysctl.conf
echo "net.inet.tcp.maxseg_unacked=32" >> /etc/sysctl.conf

For systems with >= 8 GBytes of memory:

echo "net.inet.tcp.delayed_ack=2" > /etc/sysctl.conf
echo "net.inet.tcp.sendspace=2097152" >> /etc/sysctl.conf
echo "net.inet.tcp.recvspace=2097152" >> /etc/sysctl.conf
echo "net.inet.tcp.maxseg_unacked=32" >> /etc/sysctl.conf

For systems with >=4 GBytes of memory:

echo "net.inet.tcp.delayed_ack=2" > /etc/sysctl.conf
echo "net.inet.tcp.sendspace=2097152" >> /etc/sysctl.conf
echo "net.inet.tcp.recvspace=2097152" >> /etc/sysctl.conf
echo "net.inet.tcp.maxseg_unacked=32" >> /etc/sysctl.conf

or for systems with < 4GBytes of memory:

echo "net.inet.tcp.delayed_ack=2" > /etc/sysctl.conf
echo "net.inet.tcp.sendspace=2097152" >> /etc/sysctl.conf
echo "net.inet.tcp.recvspace=2097152" >> /etc/sysctl.conf
echo "net.inet.tcp.maxseg_unacked=32" >> /etc/sysctl.conf

The above changes take effect after a reboot.

Was this article helpful?

Comments:
 

Related Articles
 > How to setup link aggregation in OS X 10.5 (Leopard).
 > How to set the MTU on 10.5 or 10.6 Link Aggregation bond and optimal MTU value for Mac OS.
 > Best method to delete an old "bond" and add a new one on Mac OS.
(Your shopping cart is empty)