Description of problem: Modifying the RPCNFSDSCOUNT variable (and uncommenting it) in /etc/sysconfig/nfs has no affect. The man page for rpc.nfsd shows nproc as an argument and the systemd unit has: ExecStart=/usr/sbin/rpc.nfsd $RPCNFSDARGS But adding the argument to RPCNFSDARGS instead of RPCNFSDCOUNT also has no affect. There was a previous bug #870143 that reported a somewhat related issue but it appears the fix for that was to remove RPCNFSDCOUNT from the ExecStart? There appears to be no way within the service itself to set the number of threads to anything but 8. # fgrep RPCNFSDCOUNT /etc/sysconfig/nfs RPCNFSDCOUNT=16 # systemctl stop nfs # systemctl start nfs # cat /proc/fs/nfsd/threads 8 # fgrep RPCNFSDARGS /etc/sysconfig/nfs RPCNFSDARGS="16" # systemctl stop nfs # systemctl start nfs # cat /proc/fs/nfsd/threads 8
You also need to "systemctl restart nfs-config". That's documented at the top of "/etc/sysconfig/nfs", which is probably the right place. I don't know, maybe some rearrangement of the systemd units could make that "systemctl restart nfs-config" unnecessary....
ugh. RTFM!! I'm sorry, I totally missed that. I didn't expect there to need to be an intermediate step. I even googled this while I was playing with it and didn't see anyone suggest that either. Yes, a rearrangement of the systemd units to not require this would be really nice, but duh!! Sorry for the noise.
OK, closing the bug, but if somebody things of a trick to avoid the need for this step, maybe we should reopen to track that work.
Can't we just use ExecStartPre=/usr/lib/systemd/scripts/nfs-utils_env.sh in all the nfs*.service unit configurations, and get rid of nfs-config service altogether? Maybe ExecStartPre happens after EnvironmentFile is loaded.. let me test.. .. Seems to work -- adding the ExecStartPre= for nfs-server.service causes the changes in /etc/sysconfig/nfs to take immediate effect..
I think this is worth doing as this will continue to catch users transitioning to a systemd-ed nfs-utils, so I've posted a patch which seems to work, but it will also require modifications to each distro's /usr/lib/systemd/scripts/nfs-utils_env.sh scripts: http://marc.info/?l=linux-nfs&m=145778435317100&w=2 I'm going to re-open this bug to track this work.
Neil Brown found a better way to fix this: http://marc.info/?l=linux-nfs&m=145809208206677&w=2
The upstream commit: commit c4940fad2a73481cad67732746a4e2bb74e8d32e Author: NeilBrown <neilb> Date: Wed Mar 16 12:18:40 2016 -0400 systemd: ensure nfs-config service is re-run as needed.
nfs-utils-1.3.3-7.rc4.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-428db89196
nfs-utils-1.3.3-7.rc4.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-b4b42c9157
nfs-utils-1.3.3-7.rc4.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-7c0d23d470
nfs-utils-1.3.3-7.rc4.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.
nfs-utils-1.3.3-7.rc4.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.
nfs-utils-1.3.3-7.rc4.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.