Skip to content

[feat] make min-reserved-fds configurable at runtime - #460

Open
qiongtubao wants to merge 1 commit into
mainfrom
feature/dynamic_change_min_reserved_fds
Open

qiongtubao wants to merge 1 commit into
mainfrom
feature/dynamic_change_min_reserved_fds

Conversation

@qiongtubao

Copy link
Copy Markdown

Move the FD-budget raise logic into raiseOpenFilesLimit() so that both maxclients and min-reserved-fds share the same runtime callback. The shared updateOpenFilesLimit() recomputes the event-loop setsize from both values, raises RLIMIT_NOFILE when needed, and resizes the ae event loop. Rollback is handled by the existing configs framework.

Cover the new behavior with unit tests in tests/unit/limits.tcl and drop min-reserved-fds from the immutable skip list in tests/unit/introspection.tcl.

Move the FD-budget raise logic into raiseOpenFilesLimit() so that both
maxclients and min-reserved-fds share the same runtime callback. The
shared updateOpenFilesLimit() recomputes the event-loop setsize from
both values, raises RLIMIT_NOFILE when needed, and resizes the ae event
loop. Rollback is handled by the existing configs framework.

Cover the new behavior with unit tests in tests/unit/limits.tcl and
drop min-reserved-fds from the immutable skip list in
tests/unit/introspection.tcl.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant