Alex.Barylski
Alex.Barylski

Reputation: 2933

Google compute costs?

I have gone over the pricing and documentation so many times but still do not understand pricing...

I picked a bare minimum server setup (CPU, RAM, etc). I am using this server as a development server (eventually) so it will be actively used about 6-8 hours a day, 5 days per week...when I entered these values in their "cost calculator" the result was a few bucks a month...perfect!

However I have been up and running for less than a week and already the price is $0.65 with a usage of 2,880.00 Minutes?!?!?!

So I am not being billed only for activity but for server uptime, entirely??? So even if the server sits idle, I am getting charged? Is there a way I can disable the instance during non-work hours? Re-enabling it when I arrive in the morning?

EDIT | how to stop compute engine instance without terminating the instance?

This may have answered my questions...

Upvotes: 1

Views: 261

Answers (1)

E. Anderson
E. Anderson

Reputation: 3493

As the other question answered, you are billed by the minute while your server is running, whether or not it is actively using the CPU.

At the moment, there's no way to leave a server shut down and restart it later; you can use a persistent boot disk to store your development state and create/delete an instance (with the same name) each day that you want to use your server.

To use a persistent boot disk like this, you'll want to make sure that the "Delete boot disk when instance is deleted" checkbox is UNCHECKED -- you want your boot disk to stick around after the instance is deleted. The next time you create your instance, select "Use existing disk", and select the same disk.

You'll still pay $0.04/GB/month for the disk storage all the time, but you'll only pay for the instance running when you need it.

You can add a cron job that checks every 10 minutes to see if the load on the machine is less than 0.05 and no one is logged in and then runs "shutdown -p now" to shut down the machine if you're concerned about forgetting to shut down the machine.

Upvotes: 2

Related Questions