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

WIP Streaming the heap snapshot! #66

Closed
wants to merge 3 commits into from

Conversation

NHDaly
Copy link
Member

@NHDaly NHDaly commented Sep 21, 2023

PR Description

Streaming the heap snapshot!

This should prevent the engine from OOMing while recording the snapshot!

Now we just need to sample the files, either online, before downloading, or offline after downloading :)

If we're gonna do it offline, we'll want to gzip the files before downloading them.

Checklist

Requirements for merging:

  • I have opened an issue or PR upstream on JuliaLang/julia: <link to JuliaLang/julia>
  • I have removed the port-to-* labels that don't apply.

@NHDaly NHDaly changed the title Streaming the heap snapshot! WIP Streaming the heap snapshot! Sep 21, 2023
@NHDaly NHDaly force-pushed the nhd-snapshot-4-streaming branch 3 times, most recently from 0e7042e to 4a7ebf7 Compare September 21, 2023 06:36
This should prevent the engine from OOMing while recording the snapshot!

Now we just need to sample the files, either online, before downloading,
or offline after downloading :)

If we're gonna do it offline, we'll want to gzip the files before
downloading them.

Allow custom filename; use original API

Support legacy heap snapshot interface. Add reassembly function.

Add tests

Apply suggestions from code review

Update src/gc-heap-snapshot.cpp

Change to always save the parts in the same directory

This way you can always recover from an OOM

Fix bug in reassembler: from_node and to_node were in the wrong order

Fix correctness mistake: The edges have to be reordered according to the
node order. That's the whole reason this is tricky.

But i'm not sure now whether the SoAs approach is actually an
optimization.... It seems like we should probably prefer to inline the
Edges right into the vector, rather than having to do another random
lookup into the edges table?

Debugging messed up edge array idxs

Disable log message

Write the .nodes and .edges as binary data

Remove unnecessary logging
@NHDaly NHDaly force-pushed the nhd-snapshot-4-streaming branch from 4a7ebf7 to c4c5c00 Compare October 4, 2023 00:02
Copy link

This PR is stale because it has been open 30 days with no activity. Comment or remove stale label, or this PR will be closed in 5 days.

@github-actions github-actions bot added the stale This pull request is inactive label Nov 13, 2023
@github-actions github-actions bot closed this Nov 19, 2023
@d-netto d-netto removed port-to-v1.10 port-to-v1.12 This change should apply to Julia v1.12 builds labels Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale This pull request is inactive
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants