i want to increase the number of openfile, and on google there are so many ex about it, but there are plenty of number too. so, are there any limit in increase number of openfile in linux?
1 Answer
/proc/sys/fs/file-max contains the currently set number of system-wide maximum open files. On my x86_64 systme, that's 9223372036854775807 (which is an incredibly large number, namely 2⁶³-1, the largest integer that you can represent in a signed 64 bit int).
You can increase that number (if it's problematically small) until your kernel complains the value you set can't be applied, e.g.
echo 1000000 > /proc/sys/fs/file-max (as root).
But usually, that limit is already very high (even on smaller machines, half a million), unless you're using a very old kernel or Linux distro.