Skip to content
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

Merged
merged 2 commits into from
Jul 23, 2024

Conversation

BGluth
Copy link
Member

@BGluth BGluth commented Jul 19, 2024

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 )

@github-actions github-actions bot added the crate: zero_bin Anything related to the zero-bin subcrates. label Jul 19, 2024
@@ -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
Copy link
Collaborator

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

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}"
Copy link
Collaborator

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?

Copy link
Member Author

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.

@Nashtare
Copy link
Collaborator

Does not attempt to change the limit (should we? We don't need root for this).

I think that should remain a user responsibility, we shouldn't expect the code to modify it arbitrarily.

@Nashtare Nashtare added this to the System strengthening milestone Jul 21, 2024
@BGluth BGluth requested a review from Nashtare July 22, 2024 17:52
Copy link
Collaborator

@Nashtare Nashtare left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM!

@Nashtare Nashtare merged commit 0160f5f into develop Jul 23, 2024
14 checks passed
@Nashtare Nashtare deleted the QoL/ulimit_check branch July 23, 2024 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crate: zero_bin Anything related to the zero-bin subcrates.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants