Manage computes
Lakebase Postgres (Autoscaling Beta) is the next version of Lakebase, available for evaluation only. For production workloads, use Lakebase Public Preview. See choosing between versions to understand which version is right for you.
A compute is a virtualized service that runs Postgres for your Lakebase database projects. Each branch has one primary (read-write) compute. A compute is required to connect to a branch and access its data.
Compute overview
Compute resources provide the processing power and memory needed to execute queries, manage connections, and handle database operations. Each project has a primary read-write compute for its default branch.
To connect to a database in a branch, you must use a compute associated with that branch. Larger computes consume more compute hours over the same period of active time than smaller computes.
View computes
To view computes for a branch, navigate to your project's Branches page in the Lakebase App and select a branch to view its Computes tab.
The Computes tab displays information about all computes associated with the branch:
| Detail | Description | 
|---|---|
| Type | The compute type: Primary (read-write) or Read Replica (read only) | 
| Status | Current status, typically Active, Idle, or Suspended | 
| Endpoint ID | The compute endpoint ID, which starts with an ep- prefix | 
| Size | The compute size and autoscaling configuration if enabled | 
| Last active | Date and time when the compute was last active | 
Create a compute
You can create a primary read-write compute for a branch that doesn't have one. Branches created in the Lakebase UI are automatically created with a read-write compute by default. You only need to create a compute manually if you've deleted a compute or created a branch through another method.
Each branch can have only one read-write compute. If your branch already has a read-write compute, you see an option to add a read replica instead. Read replicas are read-only computes that enable horizontal scaling and other use cases. Learn more: Read replicas | Manage read replicas
To create a compute:
- Navigate to your branch's Computes tab in the Lakebase App.
- Click Add a compute, configure your compute settings, and click Add.
Edit a compute
You can edit a compute to change its size, autoscaling configuration, or scale-to-zero settings.
To edit a compute:
- Navigate to your branch's Computes tab in the Lakebase App.
- Click Edit for the compute, adjust your settings, and click Save.

Changes to compute settings take immediate effect and may cause brief connection interruptions during restart.
Compute sizing
Available compute sizes
Lakebase Postgres supports compute sizes from 0.5 CU to 32 CU (0.5, then integer increments: 1, 2, 3... 16, then 24, 28, 32).
What's in a Compute Unit?
Each Compute Unit (CU) allocates approximately 2 GB of RAM to the database instance, along with all associated CPU and local SSD resources. Scaling up increases these resources linearly. Postgres distributes the allocated memory across multiple components:
- Database caches
- Worker memory
- Other processes with fixed memory requirements
Performance varies based on data size and query complexity. Before scaling, test and optimize queries. Storage scales automatically.
Lakebase Public Preview vs Autoscaling Beta: In Lakebase Public Preview, each Compute Unit allocated approximately 16 GB of RAM. In Lakebase Autoscaling Beta, each CU allocates 2 GB of RAM. This change provides more granular scaling options and cost control.
Compute specifications
| Compute Units | RAM | Max Connections | 
|---|---|---|
| 0.5 CU | ~1 GB | 104 | 
| 1 CU | ~2 GB | 209 | 
| 2 CU | ~4 GB | 419 | 
| 3 CU | ~6 GB | 629 | 
| 4 CU | ~8 GB | 839 | 
| 5 CU | ~10 GB | 1049 | 
| 6 CU | ~12 GB | 1258 | 
| 7 CU | ~14 GB | 1468 | 
| 8 CU | ~16 GB | 1678 | 
| 9 CU | ~18 GB | 1888 | 
| 10 CU | ~20 GB | 2098 | 
| 12 CU | ~24 GB | 2517 | 
| 14 CU | ~28 GB | 2937 | 
| 16 CU | ~32 GB | 3357 | 
| 24 CU | ~48 GB | 4000 | 
| 28 CU | ~56 GB | 4000 | 
| 32 CU | ~64 GB | 4000 | 
Connection limits for autoscaling computes: When autoscaling is enabled, the maximum number of connections is determined by the maximum CU size in your autoscaling range. For example, if you configure autoscaling between 2-8 CU, your connection limit is 1,678 (the limit for 8 CU).
Read replica connection limits: Read replica compute connection limits are synchronized with your primary read-write compute settings. See Manage read replicas for details.
Some connections are reserved for system and administrative use. For this reason, SHOW max_connections may show a higher value than the Max Connections shown in the table above or in the Edit compute drawer in the Lakebase App. The values in the table and drawer reflect the actual number of connections available for direct use, while SHOW max_connections includes reserved connections.
Sizing guidance
When selecting a compute size, consider these factors:
| Factor | Recommendation | 
|---|---|
| Query complexity | Complex analytical queries benefit from larger compute sizes | 
| Concurrent connections | More connections require additional CPU and memory | 
| Data volume | Larger datasets may need more memory for optimal performance | 
| Response time | Critical applications may require larger computes for consistent performance | 
Optimal sizing strategy
Select a compute size based on your data requirements:
- Full dataset in memory: Choose a compute size that can hold your entire dataset in memory for best performance
- Working set in memory: For large datasets, ensure your frequently accessed data fits in memory
- Connection limits: Select a size that supports your anticipated maximum concurrent connections
Autoscaling
Lakebase supports both fixed-size and autoscaling compute configurations. Autoscaling dynamically adjusts compute resources based on workload demand, optimizing both performance and cost.
| Configuration Type | Description | 
|---|---|
| Fixed size | Select a fixed compute size that doesn't scale with workload demand | 
| Autoscaling | Use a slider to specify minimum and maximum compute sizes. Lakebase scales up and down within these boundaries based on current load. Available for computes up to 32 CU | 
Autoscaling limit: Autoscaling is supported for computes up to 32 CU.
Configuring autoscaling
To enable or adjust autoscaling for a compute, edit the compute and use the slider to set minimum and maximum compute sizes.

For an overview of how autoscaling works, see Autoscaling.
Autoscaling considerations
For optimal autoscaling performance:
- Set your minimum compute size large enough to cache your working set in memory
- Consider that poor performance may occur until the compute scales up and caches your data
- Your connection limits are based on the maximum compute size in your autoscaling range
Autoscaling range constraints: When using the autoscaling slider, the maximum compute size you can select depends on your chosen minimum. Lower minimum values have tighter constraints on the maximum, while higher minimums allow you to scale closer to the 32 CU limit. For example, a minimum of 0.5 CU allows autoscaling up to 8 CU, while a minimum of 16 CU allows autoscaling up to 32 CU. You cannot set extreme ranges like a minimum of 0.5 CU and a maximum of 32 CU. The slider enforces these constraints automatically when you configure your autoscaling range.
Scale to zero
Lakebase's scale-to-zero feature automatically transitions a compute into an idle state after a period of inactivity, reducing costs for databases that aren't continuously active.
| Configuration | Description | 
|---|---|
| Scale to zero enabled | Compute automatically suspends after inactivity to reduce costs | 
| Scale to zero disabled | Maintain an "always-active" compute that eliminates startup latency | 
Configuring scale to zero
To enable or adjust scale to zero for a compute, edit the compute and toggle the scale-to-zero setting. When enabled, you can configure the inactivity timeout.

For an overview of how scale to zero works, see Scale to zero.
Restart a compute
Restart a compute to apply updates, resolve performance issues, or pick up configuration changes.
To restart a compute:
- Navigate to your branch's Computes tab in the Lakebase App.
- Click the menu for the compute, select Restart, and confirm the operation. 
Restarting a compute interrupts any active connections. Configure your applications to reconnect automatically to avoid prolonged interruptions.
Delete a compute
You can delete the primary compute from a branch. However, a compute is required to connect to a branch and access its data.
To delete a compute:
- Navigate to your branch's Computes tab in the Lakebase App.
- Click Edit for the compute and then click Delete compute at the bottom of the dialog.