-
Notifications
You must be signed in to change notification settings - Fork 38
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
Now warns if file descriptor limit is too small for native mode #411
Conversation
zero_bin/tools/prove_rpc.sh
Outdated
@@ -60,6 +60,9 @@ OUTPUT_TO_TERMINAL="${OUTPUT_TO_TERMINAL:-false}" | |||
# Only generate proof by default | |||
RUN_VERIFICATION="${RUN_VERIFICATION:-false}" | |||
|
|||
# Recommended soft file handle limit. Will warn if it is set lower. | |||
RECOMMENDED_FILE_HANDLE_LIMIT=4096 |
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.
I would actually recommend 8192
zero_bin/tools/prove_rpc.sh
Outdated
echo "WARNING: Maximum file descriptor limit may be too low to run native mode (current: $file_desc_limit, Recommended: ${RECOMMENDED_FILE_HANDLE_LIMIT}). | ||
Consider increasing it with: | ||
|
||
ulimit -s ${RECOMMENDED_FILE_HANDLE_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.
Isn't -s
only updating the stack size, as opposed to ulimit -n
which updates the maximum number of open file descriptors?
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.
Ahh, good catch! Not sure how that got swapped with -s
.
I think that should remain a user responsibility, we shouldn't expect the code to modify it arbitrarily. |
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.
Thanks, LGTM!
Just prints out a warning in
prove_rpc.sh
if the user has a file descriptor limit that is deemed too small when they are running in native mode. Does not attempt to change the limit (should we? We don't need root for this).If the limit is too small, then there's a good chance that we'll get various IO errors related to this with
native
mode. (#354 )