What is the maximum value that fs.nr_open can be set?
Environment
- Red Hat Enterprise Linux 6
- Red Hat Enterprise Linux 7
Issue
- What is the maximum value that fs.nr_open can be set?
Resolution
RHEL 6:
This maximum value that fs.nr_open can be set is 2147483584.
RHEL 7:
The maximum appears to be 2147483647 on x86/64
void __init files_defer_init(void)
{
sysctl_nr_open_max = min((size_t)INT_MAX, ~(size_t)0/sizeof(void *)) &
-BITS_PER_LONG;
}
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.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
