-
Notifications
You must be signed in to change notification settings - Fork 373
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
Limit server memory #4636
Merged
Merged
Limit server memory #4636
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
emilk
force-pushed
the
emilk/limit-server-memory
branch
from
January 2, 2024 15:30
b5b2d74
to
acdcef7
Compare
emilk
force-pushed
the
emilk/limit-server-memory
branch
from
January 2, 2024 15:51
acdcef7
to
e10c0ab
Compare
teh-cmc
approved these changes
Jan 3, 2024
Co-authored-by: Clement Rey <[email protected]>
Co-authored-by: Clement Rey <[email protected]>
Co-authored-by: Clement Rey <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What
Limit the amount of RAM used by the WebSocket server.
The WebSocket server will buffer all log data in memory so that late connecting viewers will get all the data.
Previously this would just eat more and more RAM until the server crashed.
There is now a limit, which default to 25% of the RAM. That is, the server will try to keep its own memory use under that limit. Note that this acts different from the viewer's
--memory-limit
which throws away old data when the total process memory exceeds the limit.The memory limit is set by the new
--server-memory-limit
argument torerun
, or by argument to theserve
functions. Note that I opted for a different argument for the server limit than for the viewer memory limit. This is partially because it should be a lot less, and partially because the limit acts differently (it is a local budget, rather than a total process limit).While working on this I noticed we don't have a
serve
function in C++, so I created an issue for that: #4638The default limit of 25% can be discussed. It leaves the other 75% for the viewer (though if the viewer is in a browser, it will likely be using much less).
Checklist
main
build: app.rerun.ionightly
build: app.rerun.io