Subnet storage utilization is increasing. What's next?

Currently, 6 subnets have passed the resource reservation limit (450GB), with the largest subnet, 3hhby holding 578GB of state. 3hhby more than 5Xed in size over the past year. An additional 6 subnets are within 15GiB of having the resource reservation limit kick in.

Canister subnet migrations would be a wonderful solution to help balance out the load as new subnets are brought online, but that sounds like a longer-term initiative that wouldn’t necessarily help with the current bursts of data now coming on chain. The worry here from the perspective of a canister developer side is that given the memory growth rate of subnet and the current 1 TiB subnet storage limit, that 3hhby may fill up or become significantly more expensive to store data on by the time migrations are ready.

Provided nodes have more memory available that is currently unused, are there any short-term plans to increase subnet storage capacity, or to allow for unused canister memory to be reclaimed?

4 Likes

I’m not sure about plans to increase capacity, but as to freeing memory - I’m not sure that’s likely to solve the problem since devs will need to opt into it. If you’re personally responsible for a lot of the usage then currently there’s the option to back up the canister and do a reinstall which will wipe all stable memory.

1 Like

Ah, thanks @abk this is a very helpful trick! So if stable memory has grown so say 200MB but is empty, then stopping the canister, taking a snapshot, and then restoring it will should reset stable memory utilization?

@luc-blaeser for Motoko canisters, is stable memory data “cleared” after deserialization back to heap during a canister upgrade?

Does the clearing of stable memory happen during the upgrade of a canister to use the new orthogonal persistence flag?

No I think restoring from snapshot will reuse the stable memory. I mean if you have a custom way to import and export the full canister state, you could export it somewhere outside the canister, then reinstall the canister (wiping both stable and heap memory) and then import the data again.