Search code examples
sqlcloudgoogle-cloud-sqlbilling

Google Cloud SQL Background Usage


I have a couple simple postgres tables of modest size, which I use a couple times per month. I was expecting minimal monthly billing cost, given the light usage. However, my monthly bill is ~ $10. Looks like I'm using a low baseline of continuous CPU which makes up that charge. I've set up this DB for a non-profit and am paying for the usage out of my own pocket, so $120/yr is non-trivial.

Is there any way to drop that background CPU usage to almost zero, so that I'm only paying for the CPU cycles I'm actively using? I've already disabled the automatic backups, and that didn't seem to have much impact.

(FYI, billing support was of zero assistance and directed me here.)


Solution

  • Google Cloud SQL bills you regardless of the CPU usage, as long as the instance is active. CPU usage doesn't affect it, and there is no GCP Free Tier for Cloud SQL.

    To avoid the charge, simply shut down the instance when you are not using it (you will still be billed for the storage, however). This may not apply for your use case of course.

    Additionally, if you have an external IP assigned to the instance, there is no way to release it while the instance is inactive, so you will be billed about 1c per hour while the instance is inactive (this charge does not apply while the instance is active). (You can avoid this by only using a private IP on the instance).

    More details on how Google Cloud SQL is billed are here: https://cloud.google.com/sql/docs/postgres/pricing