Possible bug? Canister Memory not lowered after deleting a snapshot

I recently tested out the canister snapshot feature (which is freaking awesome btw!)

As an side effect of the snapshot, it doubles the canister memory, plus some extra.

However, I recently took two snapshots. One of them doubled the canister memory from 2xx to 422 MB.

I after a day, I then deleted that snapshot, and took another snapshot. I few hours later, I notice my canister has now grown to 850MB (another 2X).

Given that I can only hold one snapshot at a time, how is this possible?

dfx canister snapshot list only shows a single snapshot atm, so I’m a bit confused w.r.t. what’s happening here, and if I’m being charged in some way for previously created snapshots :thinking:

For what it’s worth, I just tested it with my implementation in Juno and couldn’t reproduce the issue. :thinking:

Start:

472.35MB in total
117.44MB on heap
117.51MB on stable
236.17MB on backup

Delete snapshot:

236.18MB in total
117.44MB on heap
117.51MB on stable

Create snapshot:

472.35MB in total
117.44MB on heap
117.51MB on stable
236.17MB on backup

Replace snapshot:

472.35MB in total
117.44MB on heap
117.51MB on stable
236.17MB on backup

I can have a look in a few hours, as you mentioned, to check if the values still correlate.


Update 4h later:

472.35MB in total
117.44MB on heap
117.51MB on stable
236.17MB on backup

1 Like

Yeah the memory usage should drop after deleting a snapshot. Could you provide a repro that we could check out?

1 Like

Sure, sent you a DM of the canister id, and that I’m receiving this increased memory footprint via the canister_status endpoint - my heap memory footprint actually looks fine (157MB).