-
Notifications
You must be signed in to change notification settings - Fork 224
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
feat(SwingSet): Report vat snapshot size delta on save #10935
base: master
Are you sure you want to change the base?
feat(SwingSet): Report vat snapshot size delta on save #10935
Conversation
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.
LGTM after a little tweaking.
packages/SwingSet/src/kernel/vat-loader/manager-subprocess-xsnap.js
Outdated
Show resolved
Hide resolved
packages/SwingSet/src/kernel/vat-loader/manager-subprocess-xsnap.js
Outdated
Show resolved
Hide resolved
Deploying agoric-sdk with
|
Latest commit: |
60eab22
|
Status: | ✅ Deploy successful! |
Preview URL: | https://068dfe19.agoric-sdk.pages.dev |
Branch Preview URL: | https://sliakh-10910-report-heap-sna.agoric-sdk.pages.dev |
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 love that we're moving the heap snapshot slogging in a single place.
I think that if restartWorker
is true, the delta will currently remain null
(or stale) because we're never updating it with the size of the snapshot taken.
Also I guess the delta metric got stuck in the keyboard since it's not reported in the slog event ;)
packages/SwingSet/src/kernel/vat-loader/manager-subprocess-xsnap.js
Outdated
Show resolved
Hide resolved
Two changes: 1. move slog 'heap-snapshot-save' from vatKeeper.js to manager-subprocess-xsnap.js 2. track uncompressedSizeLoaded in a local variable inside createFromBundle() and report delta from makeSnapshot()
Co-authored-by: Richard Gibson <[email protected]>
Co-authored-by: Mathieu Hofman <[email protected]>
move uncompressedSizeLoaded into saveSnapshot().
f493ed3
to
60eab22
Compare
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.
Missed the snapshotStream bug. Thankfully our CI was screaming about it.
const results = await snapStore.saveSnapshot( | ||
vatID, | ||
snapPos, | ||
snapshotStream, |
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 totally missed that here. We cannot use snapshotStream
here but must use a stream provided as argument, which in the case of restartWorker would be snapStoreSaveStream
, a tee of the original snapshotStream
.
closes: #10910
Description
Security Considerations
none
Scaling Considerations
none
Documentation Considerations
heap-snapshot-save
slog entry now has a newuncompressedSizeDelta
property representing the change in snapshot size in bytes at snapshot save time if a vat had been loaded from a snapshot.uncompressedSizeDelta
is null if a vat had been started from a bundle without snapshot loaded.Testing Considerations
Need to confirm that:
uncompressedSizeDelta
is present in allheap-snapshot-save
slog entriesUpgrade Considerations
None.