
Compute Engine Preemptible VMs Are Now Generally Available - boulos
http://googlecloudplatform.blogspot.com/2015/09/Compute-Engine-Preemptible-VMs-now-generally-available.html
======
WestCoastJustin
TL/DR - Preemptible VMs are the same as regular instances except for one key
difference - they may be shut down at any time [1, 2, 3]. Similar to early AWS
spot instances from what I gather (minus the bidding exchange).

[1]
[http://googlecloudplatform.blogspot.ca/2015/05/Introducing-P...](http://googlecloudplatform.blogspot.ca/2015/05/Introducing-
Preemptible-VMs-a-new-class-of-compute-available-at-70-off-standard-
pricing.html)

[2]
[https://cloud.google.com/compute/docs/instances/preemptible](https://cloud.google.com/compute/docs/instances/preemptible)

[3]
[https://news.ycombinator.com/item?id=9564122](https://news.ycombinator.com/item?id=9564122)

~~~
boulos
And of course we give you a 70% discount ;).

Disclaimer: I worked on Preemptible VMs.

~~~
boundlessdreamz
I love Google Cloud except for Google Cloud Storage request pricing.

Cloud Storage considers retrieving an object through its HTTP url is
considered a class B XML request type which is priced at $0.01/10,000 ops.
This is 1.3x-2.5x more expensive than cloudfront and s3 respectively

Can you get somone who works on Cloud Storage to take a look at the pricing
please? :) It seems like an anomaly since Google Cloud is usually at par or
cheaper than AWS equivalents.

Also, the pricing on this page
[https://cloud.google.com/storage/pricing#operations-
pricing](https://cloud.google.com/storage/pricing#operations-pricing)
specifies only XML API pricing. I didn't expect HTTP GET requests to be
counted as XML API requests and that caused me some trouble. We moved from
cloudfront to Cloud Storage and the bill increased

~~~
boulos
Sorry for the confusion; I'll file a docs bug to make it clear that direct web
serving of GCS buckets triggers class B get requests.

The pricing difference has been a long battle...

------
MichaelGG
I love Google Compute Engine. On projects where we've been offered significant
Azure credits, I strongly recommend to still use GCE. It's fast, it's cheap,
and the management UI is simple and makes sense. Oh and their networking is
great (fast and reliable).

~~~
boulos
Glad to hear it!

For those that are curious we have a $300 free trial for 60 days, as well as a
$100,000 startups program for those that qualify
([https://cloud.google.com/developers/startups/](https://cloud.google.com/developers/startups/))

------
mjn
Pretty reasonable pricing in return for the preemptible nature. Dividing the
numbers on the pricing page [1]: If you use them as a replacement for
occasional (full-price) instances, it's a 70% discount across the board. If
you use them as a replacement for mostly-on instances that would qualify for
the sustained-usage discount, it's a 57% discount on top of that. So for
example an always-on n1-standard-1 goes from about $25/mo to $11/mo. That ends
up actually being cheaper than an equivalent DigitalOcean server, if your
workload is ok with being preempted.

[1]
[https://cloud.google.com/compute/#pricing](https://cloud.google.com/compute/#pricing)

~~~
boulos
I personally prefer to think of the 1 to 1.75 cents per core-hour as being
competitive with "roll your own": if you're thinking about building out more
servers or using preemptible, I think preemptible comes out ahead a lot.

The distinction though is that these are from our spare capacity, so it's not
a replacement for a 24x7 anything (whether that's our regular VMs or a DO
droplet). But if you're prepared for disruptions, come and play!

~~~
mjn
That's a good point, and sort of what I was using the monthly rate to eyeball.
I think in (amortized) monthly costs for other ways of provisioning bulk
computation, e.g. owning+powering your own hardware, renting a dedicated
server, or VPSs. Not really equivalent, since those are better options if 24/7
uptime is needed, while a physically owned server or rented dedicated server
are poorly priced when only occasional usage is needed. But I have a feel for
what bulk compute currently costs me per-month with full utilization, as a
starting point for comparing other options.

------
teraflop
The documentation says that you get 30 seconds warning before your VM is
forcibly terminated. Does anyone know if that's enough time to spin up a new
instance to take over from the one being preempted? I haven't messed with GCE
much, so I don't know what the typical startup latency is.

~~~
boulos
That's just about our median time to "create to ssh". I wouldn't encourage
betting on being able to spin up a replacement when you're getting shot:
that's precisely when we might be running out of capacity!

If you're looking to checkpoint and save state though, you can mount your
persistent disks separately and store whatever you need. You can also start
your shot VM back up later when capacity is available again.

~~~
toomuchtodo
Your team might want to consider extending the warning. AWS gives two minutes
notice:

[https://aws.amazon.com/blogs/aws/new-ec2-spot-instance-
termi...](https://aws.amazon.com/blogs/aws/new-ec2-spot-instance-termination-
notices/)

~~~
boulos
Thanks for the feedback. We explained the reasoning behind 30 seconds vs
"longer" in the InfoQ interview I mentioned in a different thread.

But basically if you're getting preempted it's often because some regular VM
is trying to land on the box and needs to be kicked off. Our goal here is to
make sure we don't impact even our 95th-percentile VM creation time for
regular VMs. We create and boot VMs so much faster (I think even p90 is 36s
right now) that "2 minutes" is more than it sounds like.

Finally, one of the things we tracked carefully during Beta is how quickly
people actually shut down. Median on Linux was something like 5 seconds. Even
the 90th percentile was something like 10 or 15 seconds. There might be people
avoiding the product because they "need" more time, but honestly most of those
use cases aren't really prepared for preemption and should probably stick with
a different solution.

~~~
toomuchtodo
> There might be people avoiding the product because they "need" more time,
> but honestly most of those use cases aren't really prepared for preemption
> and should probably stick with a different solution.

I really have to say it, and I'm sorry to say so, but its things like this
that keep people on AWS. Google Compute still has the feel of an experiment
versus a business, and you don't want your critical infrastructure on
someone's experiment.

2 minutes is provided by AWS to give you time to checkpoint your process(es),
get logs off the box, and to remove from an ELB if its attached to one.
Doesn't matter if you get a new VM for me spun up fast if I can't finish up
housekeeping on the ones being terminated.

