CIFS Performance Tunning on NetApp

After getting our NetApp up and running we've been pushing files to it as fast as we can. But found that when copying files to the NetApp we occasionally got file timeouts and transfer errors. At first it was thought that this was a WAN or VPN issue. But after troubleshooting we found that NetApp's CIFS settings need some adjustments.

The first setting is the cifs tcp window size. The default value is set to 17520. A lot of people on the NetApp community boards recommend setting the value to 64240 (basically the largest windows allows). This works well with older versions of Windows (2003 or earlier), but can be a different story for newer versions of Windows as Microsoft did away with TCP windows setting. My finding are to start with the high value and then lower the value if testing shows the connection performance suffering. Additionally increasing the negotiated buffer can increase performance if you have OnTap version 7 or higher.

To set the cifs settings, log into your filer and run the following commands:

options cifs.tcp_window_size 64240
options cifs.neg_buf_size 33028

Then restart cifs service. You can do this by running:

cifs terminate
cifs restart

You can also change the settings for the tcp windows size for NFS by running the following command:

options nfs.tcp.recvwindowsize 65940