如何增加Ubuntu 14.04上NFS v4的最大打开文件限制?
我已经研究了一些解决方案,特别是针对mysqld等系统服务的解决方案如何增加Ubuntu 14.04上NFS v4的最大打开文件限制?,ubuntu,nfs,Ubuntu,Nfs,我已经研究了一些解决方案,特别是针对mysqld等系统服务的解决方案 设置fs.file max=1000000 在/etc/security/limits.conf上进行设置 重新启动后,nginx和mysqld在应用更改3.后运行良好。 但是,NFS的软/硬打开文件限制仍然是默认值 $ ps aux|grep nfs root 26694 0.0 0.0 0 0 ? S 18:55 0:00 [nfsd4_callbacks] root
fs.file max=1000000
3.
后运行良好。
但是,NFS的软/硬打开文件限制仍然是默认值
$ ps aux|grep nfs
root 26694 0.0 0.0 0 0 ? S 18:55 0:00 [nfsd4_callbacks]
root 26696 0.0 0.0 0 0 ? S 18:55 0:00 [nfsd]
root 26697 0.0 0.0 0 0 ? S 18:55 0:00 [nfsd]
root 26698 0.0 0.0 0 0 ? S 18:55 0:00 [nfsd]
$ cat /proc/26696/limits |grep 'Max open files'
Max open files 1024 4096 files
$ps aux| grep nfs
根266940.0.0?S 18:55 0:00[nfsd4_回调]
根266960.0.0?南18:55 0:00[nfsd]
根266970.0.0?南18:55 0:00[nfsd]
根266980.0.0?南18:55 0:00[nfsd]
$cat/proc/26696/limits | grep“最大打开文件数”
最大打开文件数1024 4096个文件
$ sudo systemctl edit nfs-kernel-server
# Add following
[Service]
LimitNOFILE=65535
$ ps aux|grep nfs
root 26694 0.0 0.0 0 0 ? S 18:55 0:00 [nfsd4_callbacks]
root 26696 0.0 0.0 0 0 ? S 18:55 0:00 [nfsd]
root 26697 0.0 0.0 0 0 ? S 18:55 0:00 [nfsd]
root 26698 0.0 0.0 0 0 ? S 18:55 0:00 [nfsd]
$ cat /proc/26696/limits |grep 'Max open files'
Max open files 1024 4096 files