H
ow do I increase the maximum number of open files under CentOS Linux? How do I open more file descriptors under Linux? Use the following command command to display maximum number of open file descriptors: 75000 files normal user can have open in single login session. To see the hard and soft values, issue the command as follows: The number of concurrently open file descriptors throughout the system can be changed via /etc/sysctl.conf file under Linux operating systems. Many application such as Oracle database or Apache web server needs this range quite higher. So you can increase the maximum number of open files by setting a new value in kernel variable /proc/sys/fs/file-max as follows (login as the root): The above procedure sets system-wide file descriptors (FD) limits. However, you can limit httpd (or any other users) user to specific limits by editing /etc/security/limits.conf file, enter:
The ulimit command provides control over the resources available to the shell and/or to processes started by it, on systems that allow such control. The maximum number of open file descriptors displayed with following command (login as the root user).Command To List Number Of Open File Descriptors
cat /proc/sys/fs/file-max
Output:
75000
# ulimit -Hn
# ulimit -Sn
To see the hard and soft values for httpd or oracle user, issue the command as follows:# su - username
In this example, su to oracle user, enter:# su - oracle
$ ulimit -Hn
$ ulimit -SnSystem-wide File Descriptors (FD) Limits
The Number Of Maximum Files Was Reached, How Do I Fix This Problem?
# sysctl -w fs.file-max=100000
Above command forces the limit to 100000 files. You need to edit /etc/sysctl.conf file and put following line so that after reboot the setting will remain as it is:# vi /etc/sysctl.conf
Append a config directive as follows:fs.file-max = 100000
Save and close the file. Users need to log out and log back in again to changes take effect or just type the following command:# sysctl -p
Verify your settings with command:# cat /proc/sys/fs/file-max
OR# sysctl fs.file-maxUser Level FD Limits
# vi /etc/security/limits.conf
Set httpd user soft and hard limits as follows:httpd soft nofile 4096
httpd hard nofile 10240
Save and close the file. To see limits, enter:# su - httpd
$ ulimit -Hn
$ ulimit -Sn
本日志由 flyinweb 于 2010-12-22 15:01:29 发表,目前已经被浏览 2645 次,评论 0 次;
作者添加了以下标签: Maximum Number Of Open Files,file-max,ulimit;
引用通告:http://www.517sou.net/Article/554/Trackback.ashx
而且直接配置文件是效率最高的,通过其它驱动效率都相对较低,BDB
这个测试不太准确,看官方的测试结果:http://bind-dlz.sourceforg
为什么使用BDB时QPS这么低? 我在bind版本基本相似的环境中测试的
It is quite useful and interesting too.
VIRT 的上限是64G,也就是36位, cat /proc/cpuinfo的结果是:addre
昨天要准备用线程重写webbench,试验了下Fedora Linux 2.6.35.14
不明白您的具体的意思是什么?
已经发送到你QQ邮箱