An overly high value for the nofile ulimit or the fs.file-max kernel tunable can cause slowness

Solution Unverified - Updated

Environment

  • Red Hat Enterprise Linux 6, 7, or 8

Issue

  • I set the nofile ulimit to unlimited and now my system is running slowly.
  • System is slow after increasing the open files to 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

  1. Observe system slowness when a high value is in place for ulimit -n or the fs.file-max tunable.
  2. Reduce the relevant limit and see if the slowness improves.
SBR
Components
Category
Tags

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.