fs.file-max

Latest response

I need to understand the functioning of the kernel parameter "fs.file-max. "

If I add in the file "/ etc / sysctl.conf" parameter:

fs.file-max = 8000

May mean that you can have no more than 8000 open files?

The fact is that if I make a:

lsof | wc-l

I sometimes see that the number exceeds 8000.

I do not understand.

Responses

The value does not apply to a root user, so if you want to tally with the lsof output, exclude files opened by root.

So if I have a problem of "too many open files", I change the parameters of "/ etc / security / limits.conf", right?

Currently I have this:

 

*               -       nofile          8000
@was    soft    nofile    20000
@was    hard    nofile    80000

 

 

And the parameter "fs.file-max = 8000" in "/ etc / sysctl.conf" I have deleted.

 

I have instances of Websphere and Apache.

Still do not understand what this parameter does not apply to root. This means that root can bypass this limit?

Hi,

fs.file-max is a global parameter but the values at limits.conf is for per shell environment for per user (if you set so).

 

Regards.