Mag*_*lan 7 performance fedora nfs
我需要做什么来更改 RPCNFSDCOUNT 设置而不重新启动完整的服务?
我需要在不重新启动服务的情况下重新加载 NFS 配置。RPCNFSDCOUNT 线程数对于工作负载来说太低,但我无法让管理层就更改窗口的时间表达成一致。
一个普通的服务可以经常使用 SIGHUP 来做到这一点。我确实用 尝试过这个kill -HUP $(pidof rpc.mountd)
,但是在这个旧的 Fedora 8 机器上从 /etc/sysconfig/nfs 应用新的 RPCNFSDCOUNT 设置没有成功。
其他 NFS 守护进程的手册页使我倾向于认为对这些进程进行 HUP 不会有任何好处,而且我很不愿意 HUP 作为 nfsd 线程本身的父进程的 kthreadd 进程。
在明显的精神错乱之后,我想起了 /proc 文件系统。/proc/fs/nfsd,特别是控制 nfsd 服务的运行时设置。
就我而言,这意味着echo '32' > /proc/fs/nfsd/threads
将线程数设置为 32。
rpc.nfsd
如果nfs
服务器已经在运行,您可以从命令行执行并指定要添加或删除的进程数。
从 man 8 rpc.nfsd
/usr/sbin/rpc.nfsd [options] nproc
Note that if the NFS server is already running, then the options for
specifying host, port, and protocol will be ignored. The number of
processes given will be the only option considered, and the number
of active nfsd processes will be increased or decreased to match this
number. In particular rpc.nfsd 0 will stop all threads and thus close
any open connections.
Run Code Online (Sandbox Code Playgroud)