How to limit the bandwidth usage of NFS?

Published on Aug. 22, 2023, 12:20 p.m.

To limit the bandwidth usage of NFS on a Linux system, you can use the rpc.mountd daemon to set the value for --manage-gids and specify the maximum throughput rate limit. Here are the general steps:

  1. Open the /etc/sysconfig/nfs file in your preferred text editor.
  2. Add the following line:
RPCMOUNTDOPTS=--manage-gids -w max_throughput

Here, max_throughput is the maximum throughput rate limit in kilobytes per second (KB/s) that you’d like NFS to use. Adjust the value as per your needs.

  1. Save the file and restart the NFS daemon by running the following command:
sudo systemctl restart nfs

This will apply the changes to the NFS configuration.

By doing this, you can limit the maximum amount of bandwidth NFS can use hence preventing it from using all of the available bandwidth and affecting other networked services.

Tags:

nfs