# NFS4 server performance

**URL:** <https://forums.suse.com/t/nfs4-server-performance/27218>\
**Category:** SLES Configure-Administer\
**Created:** [July 6, 2015, 1:47pm UTC](https://forums.suse.com/t/nfs4-server-performance/27218 "2015-07-06T13:47:27Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![malcolm](https://avatars.discourse-cdn.com/v4/letter/m/e19b73/32.png) [@malcolm](https://forums.suse.com/u/malcolm)\
**Post date:** [July 6, 2015, 1:47pm UTC](https://forums.suse.com/t/nfs4-server-performance/27218/1 "2015-07-06T13:47:27Z")

</div>

Is there a ‘simple’ guide to getting the most from a NFS4 server  
Our servers generally have 60-90 users hanging off them and they  
are fine but occasionally things conspire so that the full 180 users  
are attached to each one and they get very slow.

I have fiddles with the use\_kernel\_nfsd\_number’ and increasing it from  
the default 4 to 64 makes a lot of difference but over 128 makes it  
slower- I am assuming all those processes exhaust something else

These servers just sit there being NFS4 servers ( for openSUSE  
clients ) and nothing else.

Has anyone some guides

Ta

M

---

<div class="post-metadata">

**Author:** ![Jens-U](https://avatars.discourse-cdn.com/v4/letter/j/d78d45/32.png) [@Jens-U](https://forums.suse.com/u/Jens-U)\
**Post date:** [July 7, 2015, 7:30pm UTC](https://forums.suse.com/t/nfs4-server-performance/27218/2 "2015-07-07T19:30:46Z")

</div>

Hi M,

the typical bottle necks apply here. Server-wise these are disk i/o, CPU and memory. Network (not only bandwith: NFS has pretty small window sizes, so latency is a factor, too). Protocol overheads, additional services (i.e. DNS delays) and NFS4-specific side effects (i.e. Kerberos performance) will influence, too.

What you haven’t told is the work load these users run across the NFS mounts. Are these home directories of up to 180 users, with all the tempfiles and databases (KDE, Firefox,…) running via NFS?

The main factors in our environment were disk I/O throughput and latencies (since switching to bcache, that has been no problem anymore), and setting the “async” options server-side.

> use\_kernel\_nfsd\_number

It depends on the number of requests that come in in parallel - “4” is a very conservative number, more suitable for test setups 😉 We’re running at 128. Take a look at /proc/net/rpc/nfsd (the “th” values), the first value is the number of threads currently active and the second number counts the number of times all threads were busy. Though, depending on your kernel NFS server version, you may not have reasonable values there (all zeros), then /proc/fs/nfsd/pool\_stats is the file to look at (see knfsd-stats.txt for a description).

Regards,  
Jens

---

<div class="post-metadata">

**Author:** ![malcolm](https://avatars.discourse-cdn.com/v4/letter/m/e19b73/32.png) [@malcolm](https://forums.suse.com/u/malcolm)\
**Post date:** [July 8, 2015, 10:46am UTC](https://forums.suse.com/t/nfs4-server-performance/27218/3 "2015-07-08T10:46:45Z")

</div>

Hi, Thanks for replying

Yes, they are home directories ( for openSUSE 13.2 clients )  
Looking at /proc/net/rpc/nfsd shows 0 in the second column  
I was wondering if nfsd is running out of buffer space - The machines have 12G of ram so it could have most of it  
It seems to happen more often when 180 users are all using LibreOffice - I am going to investigate LO’s file locking as a suspect

Ta

M

---

<div class="post-metadata">

**Author:** ![Jens-U](https://avatars.discourse-cdn.com/v4/letter/j/d78d45/32.png) [@Jens-U](https://forums.suse.com/u/Jens-U)\
**Post date:** [July 8, 2015, 1:49pm UTC](https://forums.suse.com/t/nfs4-server-performance/27218/4 "2015-07-08T13:49:33Z")

</div>

Hi M,

> It seems to happen more often when 180 users are all using LibreOffice - I am going to investigate LO’s file locking as a suspect

and try to run some long-term statistics on server memory/cpu/network/disk i/o. If you have no systems management tool set up for this, fetch MRTG or alike and monitor the appropriate SNMP variables. The resulting graphs may shed some light on the actual bottle neck.

Regards,  
Jens

---

<div class="post-metadata">

**Author:** ![malcolm](https://avatars.discourse-cdn.com/v4/letter/m/e19b73/32.png) [@malcolm](https://forums.suse.com/u/malcolm)\
**Post date:** [July 8, 2015, 5:23pm UTC](https://forums.suse.com/t/nfs4-server-performance/27218/5 "2015-07-08T17:23:35Z")

</div>

I looked at /proc/fs/nfsd and the ‘sockets-enqueued’ is significantly non-zero

- as in - about half a million… hmmm

M

---

<div class="post-metadata">

**Author:** ![Jens-U](https://avatars.discourse-cdn.com/v4/letter/j/d78d45/32.png) [@Jens-U](https://forums.suse.com/u/Jens-U)\
**Post date:** [July 8, 2015, 6:49pm UTC](https://forums.suse.com/t/nfs4-server-performance/27218/6 "2015-07-08T18:49:54Z")

</div>

Hi M,

[QUOTE=interele;28674]I looked at /proc/fs/nfsd and the ‘sockets-enqueued’ is significantly non-zero

- as in - about half a million… hmmm

M[/QUOTE]

I guess the more important question is - since when? You wrote that you started with 4 threads… if no server reboot was inbetween, then those large numbers could have their origin in those times.

It’s more important to monitor that number (as in “increase per time unit”) and correlate that with reports of bad overall performance.

Regards,  
Jens
