The default file descriptor of the Centos server is 1024 (linux). The Command ulimit-n is run. For high-load and high-connection servers, 1024 is far from enough. As for the modification method, I will not repeat it here. a large number of articles will be introduced on the Internet. This article describes how to view the maximum file descriptor that a process can open. I don't know whether SA has had such confusion. the system's file descriptor, whether it has been soft adjusted or the configuration file has been hard adjusted, is it true for the application?
The default file descriptor of the Centos server is 1024 (linux). The Command ulimit-n is run.
For high-load and high-connection servers, 1024 is far from enough. As for the modification method, I will not repeat it here. a large number of articles will be introduced on the Internet.
This article describes how to view the maximum file descriptor that a process can open.
I don't know whether SA has had such confusion. the system's file descriptor, whether it's soft-adjusted or the configuration file has been hard-adjusted, can be used by applications, is it actually effective?
There is still a way to know, the method is
Cat/proc/PID/limists | grep "Max open files"
For example.
Running on the file server
18452? Ss 0: 00 nginx: master process/usr/local/nginx/sbin/nginx
28952? S 0: 01 nginx: worker process
28954? S 0: 01 nginx: worker process
You can see the process id before nginx, and then replace the PID with the actual process id to see the result.
# Cat/proc/28952/limits | grep "Max open files"
Max open files 65536 65536 files
It is learned that the nginx 28952 process can open up to 65536 files.
By using the above method, you can know whether the modification to the file descriptor takes effect. Is it easy.