If fs.file-max is not set in /etc/sysctl.conf
on RHEL 5 or its derivatives, how does the kernel determine the default value? Is there a formula used to set the fs.file-max
value based on the amount of system RAM? I checked a number of random RHEL servers running the same OS level, but with different hardware configurations, and cat /proc/sys/fs/file-max
shows different values on each system.
How does RHEL 5 (Linux kernel 2.6.18) determine the default fs.file-max setting
max-file-descriptorsrhel5
Best Answer
I'll answer my own question: the Linux 2.6 kernel sets the open file limit to 10% of the available memory.
Source: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=fs/file_table.c