Skip to content

Review canister frozen documentation #380

@peterpeterparker

Description

@peterpeterparker

frozen canister and toppup. according what value it becomes frozen?
A canister becomes frozen when its cycles balance falls below what's required by the freezing threshold. Let me explain how this works:
Freezing Threshold Explained
The freezing threshold is a value defined in seconds that determines how many cycles a canister must maintain in its balance. According to the Internet Computer documentation, a canister is considered frozen when:
"the IC estimates that the canister would be depleted of cycles before freezing_threshold seconds pass, given the canister's current size and the IC's current cost for storage." The Internet Computer Interface Specification
The default freezing threshold is 2,592,000 seconds (approximately 30 days). This means the system will freeze a canister when it estimates the canister would run out of cycles within 30 days based on its current resource usage.
What Happens When a Canister is Frozen?
When a canister is frozen:

It stops processing any new requests
It will continue to reply to existing requests
It pays only for renting resources (compute allocation, memory allocation, and memory usage) [Canister Settings](https://internetcomputer.org/docs/building-apps/canister-management/settings#freezing-threshold)

As explained in the documentation:
"The freezing threshold protects it from deletion, since if the cycles balance dips below the threshold, the canister will stop processing any new requests; however, it will continue to reply to existing requests." Managing Canisters
Topping Up a Frozen Canister
If a canister is frozen, you can top it up with more cycles to unfreeze it. Once the frozen canister's balance is above the freezing threshold, the canister returns to normal operation.
You can top up a canister using various methods:

Using dfx cycles top-up
Through the NNS frontend dapp
Through third-party services like cycleops.dev [Topping Up a Canister](https://internetcomputer.org/docs/building-apps/canister-management/topping-up)

What Happens If You Don't Top Up?
If a frozen canister is not topped up and its cycles balance eventually reaches zero, the canister will be uninstalled - its code and state will be deleted. However, the canister ID, controllers, and other metadata will be preserved for at least 10 years according to the documentation.
This mechanism ensures that the Internet Computer remains sustainable by preventing abandoned canisters from consuming resources indefinitely.
All feedback is reviewed by the team.
Answer based on the following sources:
Topping up a canister
internetcomputer.org/docs
internetcomputer.org/docs
Setting the canister's freezing threshold
internetcomputer.org/docs
1.6 Managing canisters
Freezing threshold
internetcomputer.org/docs
Canister settings
How does it estimate?
Based on the knowledge sources, there isn't a detailed explanation of the exact algorithm or formula the Internet Computer uses to estimate when a canister would be depleted of cycles.
What we do know is that the estimation takes into account:

The canister's current size (memory usage)
The IC's current cost for storage
The idle cycles consumption rate

From the forum post response:
"The freezing threshold depends on the memory usage and compute allocation of the canister, so it can increase over time." Forum Post: Cannot delete canisters anymore
The system also tracks a value called idle_cycles_burned_per_day for each canister, which indicates how many cycles a canister consumes in its idle or frozen state:
"See also the idle_cycles_burned_per_day field in the canister's status to learn how many cycles a canister consumes in its idle or frozen state." Canister Settings
The Internet Computer charges canisters for:

Memory usage (charged at regular intervals)
Computation (charged at the time computation is performed)
Network bandwidth (charged at the time of usage)

These factors are likely used in the estimation calculation, but the specific formula or algorithm is not detailed in the provided knowledge sources.
If you need the exact estimation method, you might want to check the Internet Computer's technical specifications or ask in the developer forums for more detailed information.
Would you like to know more about how cycles are charged for different resources, or how to manage your canister's cycles balance?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions