rhel7: The number of nfsd threads is not increased from 8 to the number given by "threads" in "[nfsd]" section in the file "/etc/nfs.conf"

Solution Verified - Updated -

Issue

  • The number of nfsd threads is not increased from 8 to the number given by "threads" in "[nfsd]" section in the file /etc/nfs.conf
    1. Set "threads=20" in "[nfsd]" section in the file "/etc/nfs.conf"
# cat /etc/nfs.conf | awk '/\[nfsd\]/,/threads/'
[nfsd]
 debug=0
 threads=20
    1. If "RPCNFSDCOUNT" is specified in the file /etc/sysconfig/nfs, it will be applied for backward compatibility in RHEL7. So make sure that there is NO "RPCNFSDCOUNT" value specified in the file "/etc/sysconfig/nfs.
# grep RPCNFSD /etc/sysconfig/nfs
#RPCNFSDARGS=""
#RPCNFSDCOUNT=16
    1. Start nfs-server.service and we will find the number of nfsd threads is not increased from 8 to 20 though "threads=20" is specified in the file "/etc/nfs.conf"
# systemctl is-enabled nfs-server.service
enabled

# systemctl status nfs-server.service
● nfs-server.service - NFS server and services
   Loaded: loaded (/usr/lib/systemd/system/nfs-server.service; enabled; vendor preset: disabled)
  Drop-In: /run/systemd/generator/nfs-server.service.d
           └─order-with-mounts.conf
   Active: inactive (dead) since Fri 2019-08-02 13:33:02 JST; 2s ago
  Process: 5559 ExecStopPost=/usr/sbin/exportfs -f (code=exited, status=0/SUCCESS)
  Process: 5556 ExecStopPost=/usr/sbin/exportfs -au (code=exited, status=0/SUCCESS)
  Process: 5555 ExecStop=/usr/sbin/rpc.nfsd 0 (code=exited, status=0/SUCCESS)
  Process: 5419 ExecStartPost=/bin/sh -c if systemctl -q is-active gssproxy; then systemctl restart gssproxy ; fi (code=exited, status=0/SUCCESS)
  Process: 5402 ExecStart=/usr/sbin/rpc.nfsd $RPCNFSDARGS (code=exited, status=0/SUCCESS)
  Process: 5400 ExecStartPre=/usr/sbin/exportfs -r (code=exited, status=0/SUCCESS)
 Main PID: 5402 (code=exited, status=0/SUCCESS)

# systemctl start nfs-server.service
# systemctl status nfs-server.service
● nfs-server.service - NFS server and services
   Loaded: loaded (/usr/lib/systemd/system/nfs-server.service; enabled; vendor preset: disabled)
  Drop-In: /run/systemd/generator/nfs-server.service.d
           └─order-with-mounts.conf
   Active: active (exited) since Fri 2019-08-02 13:33:24 JST; 2s ago
  Process: 5559 ExecStopPost=/usr/sbin/exportfs -f (code=exited, status=0/SUCCESS)
  Process: 5556 ExecStopPost=/usr/sbin/exportfs -au (code=exited, status=0/SUCCESS)
  Process: 5555 ExecStop=/usr/sbin/rpc.nfsd 0 (code=exited, status=0/SUCCESS)
  Process: 5615 ExecStartPost=/bin/sh -c if systemctl -q is-active gssproxy; then systemctl restart gssproxy ; fi (code=exited, status=0/SUCCESS)
  Process: 5597 ExecStart=/usr/sbin/rpc.nfsd $RPCNFSDARGS (code=exited, status=0/SUCCESS)
  Process: 5596 ExecStartPre=/usr/sbin/exportfs -r (code=exited, status=0/SUCCESS)
 Main PID: 5597 (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/nfs-server.service

# cat /proc/net/rpc/nfsd | grep th
th 8 0 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000

# ps aux | grep nfsd
root      4555  0.0  0.0      0     0 ?        S<   13:24   0:00 [nfsd4_callbacks]
root      4561  0.0  0.0      0     0 ?        S    13:24   0:00 [nfsd]
root      4562  0.0  0.0      0     0 ?        S    13:24   0:00 [nfsd]
root      4563  0.0  0.0      0     0 ?        S    13:24   0:00 [nfsd]
root      4564  0.0  0.0      0     0 ?        S    13:24   0:00 [nfsd]
root      4565  0.0  0.0      0     0 ?        S    13:24   0:00 [nfsd]
root      4566  0.0  0.0      0     0 ?        S    13:24   0:00 [nfsd]
root      4567  0.0  0.0      0     0 ?        S    13:24   0:00 [nfsd]
root      4568  0.0  0.0      0     0 ?        S    13:24   0:00 [nfsd]
root      4660  0.0  0.0 112704   976 pts/0    S+   13:25   0:00 grep --color=auto nfsd

Environment

  • Red Hat Enterprise Linux (RHEL) 7.6
  • nfs-utils
    • observed on version 1.3.0-0.61.el7
    • version 1.3.0-0.66.el7 and later contain the fix/are not affected

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content