For AI agents: Documentation index at /llms.txt

Skip to content

Resource limits

ICP uses WebAssembly as the execution environment for canisters. Because WebAssembly is Turing-complete, the IC enforces resource limits to prevent non-terminating computations and ensure fair scheduling across all canisters on a subnet.

LimitValue
Message queue limit (between a canister pair)500
Max ingress message payload2 MiB
Max cross-subnet inter-canister message payload2 MiB
Max same-subnet inter-canister request payload10 MiB
Max response size (replicated execution)2 MiB
Max response size (non-replicated execution, query calls)3 MiB
LimitValue
Per update call, heartbeat, or timer40 billion
Per query call5 billion
Per canister install or upgrade300 billion
Per inspect_message200 million
Per round per execution thread7 billion
LimitValue
Wasm heap memory per canister4 GiB (wasm32), 6 GiB (wasm64)
Wasm stable memory per canister500 GiB
Stable memory read per replicated message2 GiB
Stable memory written per replicated message2 GiB
Stable memory read per upgrade message8 GiB
Stable memory written per upgrade message8 GiB
Stable memory read per replicated query1 GiB
Stable memory written per replicated query1 GiB
LimitValue
Wasm total size per canister100 MiB
Wasm code section per canister10 MiB
Custom sections per subnet2 GiB
Custom sections per canister1 MiB
Custom section count per canister16
Function name length1 MiB
LimitValue
Subnet capacity (total memory)2 TiB
Snapshots per canister10
LimitValue
Query execution threads per replica node4
Query execution threads per canister2
Update execution threads per subnet4
Update execution threads per canister1
LimitValue
Environment variables per canister20
Variable name length128 bytes
Variable value length128 bytes

Block production rate varies from 0.75 to 1.5 blocks per second depending on subnet load and node count. Up to 1,000 messages can be included in a block. Because ICP decouples message reception from message execution, messages included in a block are not guaranteed to execute in the same block. Messages for different canisters may execute in parallel across up to 4 execution threads, each capable of handling up to 1,000 messages. ICP targets a throughput of 2 billion Wasm instructions per thread per second.

The expiration time of an ingress message is set by the agent making the request and can be up to 5 minutes.

The IC rejects Wasm modules that exceed these structural limits:

  • More than 50,000 declared functions
  • More than 1,000 declared globals
  • A function body containing more than 1,000,000 Wasm instructions
  • More than 16 exported custom sections (names prefixed with icp:)
  • More than 1,000 exported canister_update <name> or canister_query <name> functions
  • Combined <name> lengths across all exported update and query functions exceeding 20,000 characters
  • Total exported custom sections size exceeding 1 MiB

For the full specification of these constraints, see WebAssembly module requirements.