2 NFS 10G Tuning
tengel edited this page 2024-09-05 08:27:27 -05:00

Tuning NFS on a 10gbit link - ideas only, test every change

# Allow testing with buffers up to 64MB
net.core.rmem_max=67108864
net.core.wmem_max=67108864

# Increase Linux autotuning TCP buffer limit to 32MB
net.ipv4.tcp_rmem=4096 87380 33554432
net.ipv4.tcp_wmem=4096 65536 33554432

# Raise memory for the fragmentation reassembly buffer
# (above high_thresh, kernel starts discarding packets
# until usage goes below low_thresh)
net.ipv4.ipfrag_high_thresh=524288
net.ipv4.ipfrag_low_thresh=393216

# Turn on TCP timestamps - better calculation method
net.ipv4.tcp_timestamps=1

# Disable saving of TCP metrics on connection close
# (test this first - can also degrade performance)
# net.ipv4.tcp_no_metrics_save=1

# Enable select acknowledgments
net.ipv4.tcp_sack=1

# Ensure window scaling is on
net.ipv4.tcp_window_scaling=1

# Raise the max backlog of packets on a net device
net.core.netdev_max_backlog=5000

# Recommended default congestion control is htcp for 10Gbe
net.ipv4.tcp_congestion_control=htcp

# Recommended for hosts with jumbo frames enabled
net.ipv4.tcp_mtu_probing=1

# Maximize the number of task request slots in the RPC code
sunrpc.tcp_slot_table_entries=128
sunrpc.udp_slot_table_entries=128

## Also add to /etc/rc.local (10G NIC):
## /sbin/ip link set eth4 txqueuelen 10000