Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does stopping google cloud instance stop all charges?

Ive read: https://cloud.google.com/compute/docs/instances/stopping-or-deleting-an-instance. In it they explain that:

You can stop an instance temporarily so you can come back to it at a later time. A stopped instance does not incur charges, but all of the resources that are attached to the instance will still be charged. Alternatively, if you are done using an instance, delete the instance and its resources to stop incurring charges.

However, i don't know how things are allocated in google cloud so im not sure what this means.

Say I stop my instance, I guess i am still using their storage, but im not using any CPU right? Does that mean that i will only pay for storage but not for the CPU and GPU hours?

Also how does google stop my instance? I know that if you suspend an instance in something like "Virtualbox" you can start it and start from when you left off. Is that what google does? Can I stop the instance halfway through running something and have it continue where it left off when i start the instance again?

like image 858
Qwertford Avatar asked Nov 29 '18 12:11

Qwertford


People also ask

Does Google cloud charge for stopped VM?

VMs in the TERMINATED state are not charged for per-second usage and do not count toward your regional CPU quota. However, any resources attached to the VM, such as persistent disks and external IP addresses, are charged until they are deleted.

What is difference between stop and suspend in GCP?

Suspending an instance differs from stopping an instance in the following ways: Suspended instances preserve the guest OS memory, device state, and application state. Google charges for the storage necessary to save instance memory. You can only suspend an instance for up to 60 days.

Is Google cloud free forever?

The great thing is that Google cloud has an amazing free tier which you can use for host your website free forever also Google cloud platform has a stable and advance technology that you can use to host your website.


1 Answers

When you stop your instance, you will not pay for CPU or GPU while the instance is stopped as the instance is not using them but you will be charged for resources attached as stated in the link you posted:

Your instances are not charged for per-second usage charges in TERMINATED state but any resources attached to the virtual machine will be charged until they are deleted, such as static IPs and persistent disks.

Google stops your instance by shutting it down, so you will lose data that is not in a persistent disk already.

From their docs:

When you shut down or delete an instance, Compute Engine sends the ACPI Power Off signal to the instance and waits a short period of time for your instance to shut down cleanly. If your instance is still running after this grace period, Compute Engine forcefully terminates it even if your shutdown script is still running.

There is a gcloud command that is in alpha that can suspend your VM: gcloud alpha compute instances suspend, you can read more in the docs here. It will only work on instances not using GPU or CSEK or preemptible VMs.

like image 84
Nickson Thanda Avatar answered Sep 20 '22 15:09

Nickson Thanda