Set Ulimit value (number of Linux file handles) permanently in effect
Inux default number of open files Linux defaults to 1024 open files, through ulimit-a You can view open files
Modify this limit to use Ulimt-shn 65536
The following settings are required for permanent entry:
1./etc/pam.d/login Add pam_limits.so (sometimes the system defaults to add)
First find the specific location of the file by finding/-name pam_limits.so
Session required/lib/security/pam_limits.so
2./etc/security/limits.conf add
Www-nofile 1006154
www is a user, if you want all users to take effect to replace the *, set the value of the hardware configuration, do not set too large.
* Soft Nofile 65536
* Hard Nofile 65536
3. Modify/etc/rc.local Add
echo 8061540 >/proc/sys/fs/file-max
(The data here is adjusted according to your actual needs)
The practical problem solved by this method is that the number of open files in Squid,mysql will exceed the process limit of the system and cause the bottleneck of the system in the high load.
Http://blog.sina.com.cn/s/blog_520fb00d0100hnso.html