An overly high value for the nofile ulimit or the fs.file-max kernel tunable can cause slowness
Environment
- Red Hat Enterprise Linux 6, 7, or 8
Issue
- I set the
nofileulimit tounlimitedand now my system is running slowly. - System is slow after increasing the
open filesto a high value.
Resolution
Use trial-and-error to find a value for nofile (ulimit -n) or fs.file-max that is sufficient but not excessive. Techniques such as running lsof | wc -l or iterating through /proc/self/fd can be used to get the current number of open file descriptors, which can be used as a basis for tuning the limits.
Root Cause
Under investigation.
Diagnostic Steps
- Observe system slowness when a high value is in place for
ulimit -nor thefs.file-maxtunable. - Reduce the relevant limit and see if the slowness improves.
SBR
Product(s)
Components
Category
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.