The maximum number of concurrent requests from a Network File System (NFS) agent is 2 by default. This reduces the performance of NFS file systems. We recommend that you set the maximum number to 128. This topic describes how to modify the maximum number of concurrent NFS requests.

You can use one of the following methods to modify the maximum number of concurrent NFS requests.

Note After you use method 1 to modify the maximum number, you must restart the ECS instance. This may affect business continuity. You can use method 2 to modify the maximum number of concurrent NFS requests without restarting the ECS instance.

Method 1

  1. Install an NFS agent. For more information, see Install an NFS agent.
  2. Run the following commands to set the maximum number of concurrent NFS requests to 128.
    echo "options sunrpc tcp_slot_table_entries=128" >> /etc/modprobe.d/sunrpc.conf
    echo "options sunrpc tcp_max_slot_table_entries=128" >>  /etc/modprobe.d/sunrpc.conf
    Note The first time you install an NFS agent, run the preceding commands once with root permissions. You do not need to run the commands again.
  3. Use the following command to restart the ECS instance.
    reboot
  4. Mount a file system. For more information, see Mount an NFS file system.
  5. Use the following command to verify the results.

    If the returned value is 128, the maximum number is modified.

    cat /proc/sys/sunrpc/tcp_slot_table_entries

Method 2

  1. Install an NFS client. For more information, see Install an NFS client.
  2. Run the following command to set the maximum number of concurrent NFS requests to 128.
    echo "options sunrpc tcp_slot_table_entries=128" >> /etc/modprobe.d/sunrpc.conf
    echo "options sunrpc tcp_max_slot_table_entries=128" >>  /etc/modprobe.d/sunrpc.conf
    Note The first time you install an NFS agent, run the preceding commands once with root permissions. You do not need to run the commands again.
  3. Mount a file system. For more information, see Mount an NFS file system.
  4. Run the following command to set the maximum number of concurrent NFS requests to 128.
    sysctl -w sunrpc.tcp_slot_table_entries=128
  5. Unmount a file system. For more information, see Unmount a file system from a Linux ECS instance.
  6. Mount the file system again. For more information, see Mount an NFS file system.
  7. Use the following command to verify the results.

    If the value 128 is returned, it indicates that the maximum number is modified.

    cat /proc/sys/sunrpc/tcp_slot_table_entries