Solana’s compute budget is a crucial aspect of its transaction processing system, determining how computational resources are allocated and managed. For a detailed understanding, you can refer to the official Solana documentation.
Key Takeaways
- Each instruction has a default allocation of 200,000 compute units (CUs).
- Transactions are capped at a maximum of 1,400,000 CUs.
- ComputeBudget instructions help optimize transaction costs.
Compute Unit Limits and Budget Instructions
In Solana, each transaction is subject to compute unit (CU) limits to ensure efficient use of network resources. By default, each instruction within a transaction is allocated 200,000 CUs, while the entire transaction is capped at 1,400,000 CUs. This allocation can be adjusted using specific instructions like SetComputeUnitLimit and SetComputeUnitPrice, which allow developers to optimize the compute units based on their transaction needs.
These instructions are part of the Compute Budget Program, which includes four main variants: RequestHeapFrame, SetComputeUnitLimit, SetComputeUnitPrice, and SetLoadedAccountsDataSizeLimit. Each variant serves a specific purpose, such as setting maximum compute units or defining heap sizes for transactions.
Scheduler Cost Model and Execution Budget
The scheduler cost model in Solana estimates transaction resource usage before execution. This pre-execution cost estimation helps determine if a transaction fits within the block’s remaining capacity. The total cost is calculated by summing up various components like signature cost, write lock cost, and programs execution cost.
Understanding these components is essential for developers to manage transaction costs effectively. For more insights into managing compute budgets and other Solana features, explore our Solana guides.




