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.
| Limit | Value |
|---|
| Message queue limit (between a canister pair) | 500 |
| Max ingress message payload | 2 MiB (3.5 MiB on the NNS subnet) |
| Max cross-subnet inter-canister message payload | 2 MiB |
| Max same-subnet inter-canister request payload | 10 MiB |
| Max response size (replicated execution) | 2 MiB |
| Max response size (non-replicated execution, query calls) | 3 MiB |
| Limit | Value |
|---|
| Per update call, heartbeat, or timer | 40 billion |
| Per query call | 5 billion |
| Per canister install or upgrade | 300 billion |
Per inspect_message | 200 million |
| Per round per execution thread | 4 billion |
| Limit | Value |
|---|
| Wasm heap memory per canister | 4 GiB (wasm32), 6 GiB (wasm64) |
| Wasm stable memory per canister | 500 GiB |
| Stable memory read per replicated message | 2 GiB |
| Stable memory written per replicated message | 2 GiB |
| Stable memory read per upgrade message | 8 GiB |
| Stable memory written per upgrade message | 8 GiB |
| Stable memory read per query call | 1 GiB |
| Stable memory written per query call | 1 GiB |
The query limits apply to every query type: non-replicated, replicated, and composite queries, as well as inspect_message.
| Limit | Value |
|---|
| Wasm total size per canister | 100 MiB |
| Wasm code section per canister | 12 MiB |
| Custom sections per subnet | 2 GiB |
| Custom sections per canister | 1 MiB |
| Custom section count per canister | 16 |
| Function name length | 1 MiB |
| Limit | Value |
|---|
| Subnet capacity (total memory) | 2 TiB |
| Snapshots per canister | 10 |
| Limit | Value |
|---|
| Query execution threads per replica node | 4 |
| Query execution threads per canister | 2 |
| Update execution threads per subnet | 4 |
| Update execution threads per canister | 1 |
| Limit | Value |
|---|
| Environment variables per canister | 32 |
| Variable name length | 128 bytes |
| Variable value length | 128 bytes |
Block production rate varies from 1 to 3 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. 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>, canister_query <name>, or canister_composite_query <name> functions
- Combined
<name> lengths across all exported update, query, and composite 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.