linux上NFS性能参数

linux nfs客户端对于同时发起的NFS请求数量进行了控制,若该参数配置较小会导致IO性能较差,查看该参数:

cat /proc/sys/sunrpc/tcp_slot_table_entries

默认编译的内核该参数最大值为256,可适当提高该参数的值来取得较好的性能,请以root身份执行以下命令:

  1. echo "options sunrpc tcp_slot_table_entries=128" >> /etc/modprobe.d/sunrpc.conf
  2. echo "options sunrpc tcp_max_slot_table_entries=128" >> /etc/modprobe.d/sunrpc.conf
  3. sysctl -w sunrpc.tcp_slot_table_entries=128

修改完成后,您需要重新挂载文件系统或重启机器。

原文地址:https://www.cnblogs.com/smail-bao/p/7833846.html