---
title: Scale Postgres VMs
objective: Scale Postgres instances up to handle more capacity
layout: framework_docs
order: 50
---
See [Monitoring](/docs/postgres/managing/monitoring/) for how to check the current sizes of the VMs in your Postgres cluster.
<div class="warning icon">
**Before scaling a Postgres VM:** Consider the [Postgres configuration parameters](/docs/postgres/managing/configuration-tuning/) of your cluster, and adjust the resources accordingly. In particular, if the `shared-buffers` value is proportionally too high for the VM RAM, then a Postgres VM might fail its health checks.
<br><br>
If you're scaling your VMs up, then scale the VMs first before adjusting the Postgres config to match. If you're scaling down, then adjust the cluster's Postgres parameters to match the reduced resources before scaling the VMs.
</div>
Scale VM resources for each Machine in the cluster with the [`flyctl machine update`](https://fly.io/docs/flyctl/machine-update/) command. Here's an example of scaling RAM to 1GB on a machine:
```cmd
fly machine update e784079b449483 --vm-memory 1024 --app pg-test
```
You can use [`fly machine status`](/docs/flyctl/machine-status/) again to confirm the new scale of the Machine.
## HA clusters
If you have more than one instance in the primary region cluster, scale these VMs identically; they are meant to be interchangeable so the cluster can fail over in case of trouble.
## Postgres resource parameters
When you created your Fly Postgres cluster, certain Postgres configuration parameters were set to sensible values for the resources being provisioned. This means you may want, or need, to change them if you scale your VM resources. Read [Configuration Tuning](/docs/postgres/managing/configuration-tuning/) before scaling down.
Scale Postgres VMs
See Monitoring for how to check the current sizes of the VMs in your Postgres cluster.
Before scaling a Postgres VM: Consider the Postgres configuration parameters of your cluster, and adjust the resources accordingly. In particular, if the shared-buffers value is proportionally too high for the VM RAM, then a Postgres VM might fail its health checks.
If you’re scaling your VMs up, then scale the VMs first before adjusting the Postgres config to match. If you’re scaling down, then adjust the cluster’s Postgres parameters to match the reduced resources before scaling the VMs.
Scale VM resources for each Machine in the cluster with the flyctl machine update command. Here’s an example of scaling RAM to 1GB on a machine:
You can use fly machine status again to confirm the new scale of the Machine.
HA clusters
If you have more than one instance in the primary region cluster, scale these VMs identically; they are meant to be interchangeable so the cluster can fail over in case of trouble.
Postgres resource parameters
When you created your Fly Postgres cluster, certain Postgres configuration parameters were set to sensible values for the resources being provisioned. This means you may want, or need, to change them if you scale your VM resources. Read Configuration Tuning before scaling down.