Tuning the Kernel NFS Client
In Linux, the number of simultaneous NFS requests is limited by the Remote Procedure Call (RPC) subsystem. The maximum number of simultaneous requests defaults to 16. Maximize the number of simultaneous requests by changing the kernel tunable sunrpc.tcp_slot_table_entries
value to 128.
As superuser, run the following command to change the instantaneous value of simultaneous RPC commands:
# sysctl -w sunrpc.tcp_slot_table_entries=
128
Edit the file /etc/modprobe.d/modprobe.conf.dist
and change the line:
install sunrpc /sbin/modprobe --first-time --ignore-install sunrpc && { /bin/mount -t rpc_pipefs sunrpc /var/lib/nfs/rpc_pipefs > /dev/
null
2
>&
1
|| :;
to
install sunrpc /sbin/modprobe --first-time --ignore-install sunrpc && { /bin/mount -t rpc_pipefs sunrpc /var/lib/nfs/rpc_pipefs > /dev/
null
2
>&
1
; /sbin/sysctl -w sunrpc.tcp_slot_table_entries=
128
; }
*Improper changes to the modprobe.conf.dist file may disrupt use of NFS on the system. Check with your system administrator or operating system vendor for assistance. Save a copy of the modprobe.conf.dist in a directory other than /etc/modprobe.d before starting.
RHEL 5.7 through RHEL 6.2
As superuser, run the following command to change the instantaneous value of simultaneous RPC commands:
# sysctl -w sunrpc.tcp_slot_table_entries=
128
If it doesn't already exist, create the file /etc/modprobe.d/rpcinfo
with the following contents:
options sunrpc tcp_slot_table_entries=
128
RHEL 6.3 onwards
Beginning with RHEL 6.3, the number of RPC slots is dynamically managed by the system and does not need to be tuned. Although the sunrpc.tcp_slot_table_entries
tuneable still exists, it has a default value of 2, instead of 16 as in prior releases. The maximum number of simultaneous requests is determined by the new tuneable, sunrpc.tcp_max_slot_table_entries
, which has a default value of 65535.