SUSE Support

Here When You Need Us

NFS Perfomance Issues? Always check this on a Linux NFS Server

This document (000021413) is provided subject to the disclaimer at the end of this document.

Situation

Performance for NFS mounted file systems (at NFS client machines) seems slow.  The NFS Server is a SUSE Linux (or any Linux) system.

The NFS client activity is not totally "hung" and the client is not logging "nfs: <servername> not responding" errors in /var/log/messages, even after 3 minutes.  But operations on NFS mounts are going more slowly than they should.

Resolution

The kernel-based Linux NFS Server defaults to using only a few process threads to get work done for clients.  For example, on SLES systems the initially configured default is only 4 threads.  This is not usually adequate for production activities, or anything that will generate much load.

You can increase the number of threads at a Linux NFS Server instantly, for example, to 128, with the command (as root):
 
rpc.nfsd 128

Even 16 or 32 would be much better than the default of 4.  There typically is no worry about giving "too many" threads.  128 is usually plenty (often more than required), unless there is really a extreme load being generated by a large number of clients, or if a strange bug is present, causing inefficiency.  Once in a while up to 256 is needed, but that is rare.

If even 256 doesn't help, then the number of threads is not likely the main cause of your performance problem.

When you settle on a number which is desired for the permanent configuration, edit /etc/sysconfig/nfs and set:
USE_KERNEL_NFSD_NUMBER="128"
# or whatever number is desired
# "4" is typically present in this file, initially.

Status

Top Issue

Additional Information

You can also check the number of [nfsd] thread with
ps aux | grep "\[nfsd\]" | wc -l

The above square brackets ( [ and ] ) are tricky, so if you don't get the above syntax just right, you may find and count more threads that expected (the wrong ones).

If you just view the grep results rather than send them to "wc", the threads called [nfsd] are the ones in question.  For example, in this output of a grep WITHOUT the square brackets:
# ps aux | grep nfsd
root      1538  0.0  0.0      0     0 ?        S<   09:39   0:00 [nfsd4_callbacks]
root      1541  0.0  0.0      0     0 ?        S    09:39   0:00 [nfsd]
root      1542  0.0  0.0      0     0 ?        S    09:39   0:00 [nfsd]
root      1543  0.0  0.0      0     0 ?        S    09:39   0:00 [nfsd]
root      1544  0.0  0.0      0     0 ?        S    09:39   0:00 [nfsd]
root      5379  0.0  0.0   9292  1576 pts/0    S+   12:05   0:00 grep --color=auto nfsd

Above, there are 6 threads found but only 4 are the [nfsd] threads in question.

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:000021413
  • Creation Date: 16-Apr-2024
  • Modified Date:16-Apr-2024
    • SUSE Linux Enterprise Server

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.