-
Notifications
You must be signed in to change notification settings - Fork 2.2k
feat: add --fdlimit flag #20168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat: add --fdlimit flag #20168
Conversation
mattsse
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm, undecided about this
| if fdlimit == 0 { | ||
| // Use system default (raise to maximum) | ||
| match fdlimit::raise_fd_limit() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will alter current behaviour and will likely be super annoying
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0 for old behavior may be okay.
| /// Raise the open file descriptor resource limit. | ||
| /// | ||
| /// Default: 0 (system default). When set to 0, uses the system's default file descriptor | ||
| /// limit. When set to a positive value, attempts to raise the limit to that value. | ||
| #[arg(long, value_name = "LIMIT", default_value_t = 0, global = true)] | ||
| pub fdlimit: u64, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure we really need this
imo always raising is appropriate
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even if the system allows setting a higher file descriptor limit, the actual availability of resources such as memory and CPU can impact the stability and performance of the program. Setting the file descriptor limit too high can lead to resource exhaustion, which may cause the system or application to become unstable. This is because every open file descriptor consumes system resources, and if the number of file descriptors is increased significantly, it can strain the system's capacity to manage them effectively. Therefore, it's important to consider the overall resource usage and system capabilities when adjusting file descriptor limits.
we might still need this for reason like debug and some other reason.
|
add flag