NFS Performance 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 necessarily totally "hung" and the client might not be 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
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
Additional Information
You can also check the number of [nfsd] threads 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 than 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: 27-Mar-2024
- Modified Date:20-Nov-2024
-
- SUSE Linux Enterprise Server
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com