Page MenuHomeFreeBSD

Limit openfiles-cur to 1024
AbandonedPublic

Authored by trasz on Nov 27 2019, 11:09 PM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 19 2024, 9:21 AM
Unknown Object (File)
Dec 20 2023, 7:59 AM
Unknown Object (File)
Nov 19 2023, 2:26 AM
Unknown Object (File)
Jul 1 2023, 8:46 PM
Unknown Object (File)
Jun 17 2023, 1:59 PM

Details

Reviewers
kevans
allanjude
Summary

Limit the default soft limit of opened file descriptors to 1024.
A lot of software developed for systems without closefrom(2) loops
trying to close all file descriptors from N to the rlimit, all
58977 of them, one syscall per nonexistent fd.

Note that this does not affect the hard rlimit - the process can still
raise the soft limit using setrlimit(2). They do use it, since they are
usually being developed under distributions which set the limit the
exact same way.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 27824
Build 26003: arc lint + arc unit

Event Timeline

trasz added a reviewer: kevans.
This revision is now accepted and ready to land.Nov 27 2019, 11:13 PM
allanjude added a subscriber: allanjude.

Reviewed by: allanjude

Not a fan of this, personally. This default limit on Linux results in a lot of people hitting the limit, being confused, others documenting how to raise it and the first group searching for how to raise it. Doesn't seem like the best idea to have our users have to do that too. I get the motivation, but would rather have close_range or fdwalk. But again, that's just my personal opinion.