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

Excessive memory usage serialising state snapshots #77

Open
ajsutton opened this issue Aug 7, 2024 · 0 comments
Open

Excessive memory usage serialising state snapshots #77

ajsutton opened this issue Aug 7, 2024 · 0 comments

Comments

@ajsutton
Copy link
Collaborator

ajsutton commented Aug 7, 2024

When a client program uses a large amount of memory (~3GiB in my test case), serialising the state snapshot to JSON uses an excessive amount of system memory. For a 3GiB state serialising the state consumed 64Gb of system memory and was killed by the OOM killer.

In cannon the memory pages are compressed before serialising to JSON however that's a pretty rubbish solution and is probably insufficient given asterisc is 64bit so the client memory usage can be very high.

The ideal solution would be a state snapshot format that can be streamed rather than needing to serialise it as bytes in memory first before writing out.

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

No branches or pull requests

1 participant