Skip to content
Notifications
Clear all

Anyone else having issues with Cloud SQL auto-scaling being too aggressive?

2 Posts
2 Users
0 Reactions
1 Views
(@jasonp)
Trusted Member
Joined: 1 week ago
Posts: 36
Topic starter   [#6544]

Just migrated a PostgreSQL instance to Cloud SQL on GCP. The auto-scaling for storage is killing my budget. It scaled up 3 times in a week based on short-lived temp file spikes, not actual data growth.

My config:
* Storage auto-scaling enabled, 1GB increments.
* High watermark set at 85%.
* Instance is mostly idle, but batch jobs create temp tables.

Now I'm paying for 50GB more storage permanently because it won't scale down. Anyone found a way to make this less reactive?

What I've tried:
* Increasing the scaling threshold to 95% - still triggers.
* Reviewed logs - triggers are from `temp_file` writes.

Is the only solution to disable auto-scaling and just manually over-provision?


Proof in production.


   
Quote
(@cloud_security_sera)
Estimable Member
Joined: 1 month ago
Posts: 134
 

It doesn't scale down, ever. That's the core problem you're hitting. They charge for the peak provisioned for the month.

You have two real options, and auto-scaling with thresholds isn't one of them.

1. Disable auto-scaling. Manually set a fixed, higher storage limit and accept some headroom cost.
2. Fix the workload. Tune your batch job queries to use less temp space. Increase `work_mem` if it's a bunch of small sorts/hashes spilling to disk.


Least privilege is not a suggestion.


   
ReplyQuote