25 ms·
GCP releases Spot VMs, the next generation of Pre-emptible VMs
- travisd 5y agoI don’t see this in the article, but is there any reason why they’d introduce a new VM type rather than just removing the 24hour limit of preemptible VMs?
- dragonwriter 5y agoPreemptible VMs are GA, Spot VMs are not; if there are changes that might be made to Spot before GA (such as other limits, etc.), this gives them the freedom to do that, without impacting those using Preemptible.
- Thristle 5y agoBranding probably. Being inline with Azure and AWS is helpful when onboarding new customers
- shock-value 5y agoIt's probably a niche use case, but there is some utility to having a guaranteed daily shutoff. For example, you might spin up an instance as an on-demand remote dev environment, and the 24 hour cutoff ensures it doesn't accidentally get left on (over a weekend, for example). This would be easy to work around, but nonetheless could lead to unexpectedly high charges if you were relying on this behavior only to have it silently change.
- roca 5y agoIn AWS we just `sudo shutdown +1440`. Then we can cancel the shutdown later if we need to.
- Tenoke 5y agoIn AWS I set up a few lambdas to shut down my instances automatically because I've had some cases where everything crashes so thoroughly that the shutdown doesn't go off.
- roca 5y agoThat sounds painful!
- macintux 5y agoThere's some bug we keep hitting that causes some EC2 instances to reboot on shutdown instead of halt and terminate. AWS engineers promised a fix months ago, no news yet.
- cma 5y agoTha sounds like a horrific dev environment, if randomly shut down with 30 seconds notice.
- chromakode 5y agoOne thing this helps with is keeping development environments up to date. When there's a large spread between instance lifetimes, it becomes more difficult to deploy updates and changes to developer infrastructure. This can grow into an org problem where shipping dev infra changes blocks on disrupting dev workflows. You can approach this by continuously deploying upgrades to the dev fleet, but it's simpler to simply set a lifetime bound (with an opt-out for special circumstances).
- jhugo 5y agoI can imagine it being useful if you needed to test something out for an hour or two and were worried you might forget to shut it down. Your charges are capped at 24h no matter how badly you screw up.
- kubanczyk 5y agoIf a test workload goes wrong in an interesting way, someone would very likely want to ssh there to poke around. If the poking extends to ~24 hours later, it is bound to get brutally interrupted. The worst part, there is no easy way to avoid it. (Well, one could shut it down and start again to reset the 24-hour timer, but that is cumbersome comparing to removing a `shutdown` line from crontab of a spot instance.)
- shock-value 5y ago"Horrific" is massive hyperbole, at least for my use case. (I actually use a GCP preemptible instance in this manner for a personal project, and spot instances will have the same shutoff risk.) I edit application code on my (relatively underpowered) laptop, and automatically mirror it to the instance where the running services picks up any changes, and recompiles and relaunches as needed. It's a fairly chunky app code-wise so moving the CPU usage off of my laptop is very helpful. When and if the instance shuts off early, I just relaunch it and reconnect. This amounts to one click of the mouse in the GCP UI, one locally run terminal command to connect, and one remote terminal command to (re)start my app. No work lost, and the cost savings are worth the minor inconvenience. Usually the instances last the full 24 hours anyway, and I usually shut it down when I'm done working, so interruptions are very rare. I can understand that in the context of a larger company with more resources, a dev would be put off by this. But it works very well for my uses.
- Thristle 5y agoIt wasn't a 24H guarantee, it was UP TO 24h It did guard you from keeping things on by mistake but there are way more downsides to this kind of restrictions. Especially that you can simulate the daily shutoff like other comments here said
- andoma 5y agoI run a small CI system which starts relatively beefy preemptible instances for jobs. Normally those instances are terminated by the job scheduler as soon as there's nothing more to do. But it's a great peace of mind knowing they can't run for more than 24h if my job scheduler screws something up for whatever reason. I see it as a feature rather an a limitation for my use case.
- kevincox 5y agoYes, but they could just provide a flag `maxLifetime` which defaults to `24h` but can be set to 0. (It can even only accept those two values) Instead they created a whole new API for basically the same feature.
- willcipriano 5y agoCreating a new api has greater "impact".
- andoma 5y agoThis would be superior of course. Ideally being able to limit maximum runtime down to one hours.
- londons_explore 5y agoIt smells like some person/team trying to get a promotion for launching a big new feature, rather than their perf packet saying "added option to not terminate after 24h". Functionally, I see no difference.
- ripvanwinkle 5y agoIt appears that GCP is rather late to the party here. I believe AWS has had spot instances for a very long time (more than 5 years at least) Is my understanding correct? and if so any insights on why it took so long
- wmf 5y agoGCP has had "preemptible" VMs for years; the only news is that they renamed them to "spot" to match AWS. I wonder if they were losing checkboxes over the naming.
- ernsheong 5y agoGCP has had Preemptible VMs, which WILL terminate after 24 hours if it lasted that long. Spot VMs removes this 24h limit.
- williamstein 5y agoThey also changed the pricing model. Preempts had a completely predictable discount, and spot VM's have a variable discount.
- gravypod 5y agoAny word on pricing?
- travisd 5y agoChanges over time and ranges from 60-91% discount, according to the docs: https://cloud.google.com/compute/docs/instances/spot#pricing https://cloud.google.com/compute/docs/instances/spot#pricing
- remram 5y agoIf it changes at most once in 30 days, that seems different from AWS.
- teraflop 5y agoAmong other things, the price cuts are a nice change for ultra-cheap hobby projects that have extremely low resource demands. So far the lowest Spot VM price I've found is e2-micro in us-west4, which costs a whopping $0.69/month for 2GB of RAM and 0.25 of a shared core. That's only 25% the cost of Amazon's comparable t3a.small.
- sodality2 5y agoKeep in mind as far as I can tell there's a $1.44 fee for an external IP address (only if it's in use by a preemptible VM). If it's not in use, it's even higher.
- londons_explore 5y agoIt isn't written anywhere in the documentation, but the first 744 IP address-hours per month are charged at $0.00. Link to pricing page: https://cloud.google.com/skus/?currency=USD&filter=C054-7F72-A02E%2509 https://cloud.google.com/skus/?currency=USD&filter=C054-7F72... That means if you just need one VM, you won't pay for IP charges. Obviously that might change anytime without notice.
- titzer 5y agoI have trouble thinking of a use case that fits this VM type. Is it for batch processing tasks that don't have tight deadlines? The lack of any real guarantees makes it hard to price, as you have no idea what you're actually paying for. Would it make sense to have a model that includes deadlines in its pricing (like give this process 2.5 hours of CPU and 4GB of RAM to complete this task by...next Tuesday)?
- wmf 5y agoYou might be misunderstanding how spot works. The VM either runs at full speed or not at all so you know what you're getting.
- titzer 5y agoNevertheless, doesn't that force you to divide your work up into units somehow and manage external storage to track what/how much is done?
- jiggawatts 5y agoYes, but this is common for "cloud native" applications. Web servers are ideally stateless "cattle", not "pets". Code is pulled down via CI/CD pipelines or via container images. State is in databases or blobs. Logs stream to some sort of analytics system. Similarly, Kubernetes works well with spot VMs. You can have Spot and Regular node pools in one cluster, and then your workloads can happily spread out to the extra capacity at a huge discount.
- Spivak 5y agoIt's really easy to "beat" the chaos monkey with this kind of design. You can destroy any VMs in our infra with reckless abandon and everything will be fine. If you destroy all the VMs of particular service obviously it will affect availability but it will still recover by itself in about 60 seconds.
- wbl 5y ago
- aetherspawn 5y ago“requiredDuringSchedulingIgnoredDuringExecution” .. wow, what an epic length for a configuration option!
- deleted 5y ago[deleted]
- mike_d 5y agoLet me introduce you to CNLabelContactRelationYoungerCousinMothersSiblingsDaughterOrFathersSistersDaughter https://developer.apple.com/documentation/contacts/cnlabelcontactrelationyoungercousinmotherssiblingsdaughterorfatherssistersdaughter https://developer.apple.com/documentation/contacts/cnlabelco...
- aetherspawn 5y agoI doubt the person who released this did it with a straight face.
- ur-whale 5y ago>“requiredDuringSchedulingIgnoredDuringExecution” .. wow, what an epic length for a configuration option Looks like Java culture is alive, well and spreading.
- tecleandor 5y agoSeems Kubernetes-y: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity https://kubernetes.io/docs/concepts/scheduling-eviction/assi...
- ur-whale 5y ago>Seems Kubernetes-y: Two guesses as to where the folks who implemented Kubernetes hail from (as in: which programming language)
- 5y ago
- Sanguinaire 5y agoIt's weird how the 3 major clouds have taken different paths to what must be an almost identical resource allocation problem. AWS has had this kind of spot instance for years, but with a 2 minute grace period rather than the 30 seconds GCP is offering. Azure and GCP both originally went with the 24-hour cutoff (which can easily be replicated on a regular spot instance if needed), but now GCP are backing off on that restriction.
- Thristle 5y agoI don't remember Azure having the 24H cutoff. My spots/low priorities used to run for weeks I used LP/spot both as scaling sets and the more recent single VMs Also i wouldn't call the cutoff and grace period as "paths". There were much more substantial differences between the different clouds
- Sanguinaire 5y agoI seem to remember the Azure 24 hour limit being in place in 2018, though it wasn't highlighted particularly well and came as a surprise to me. Could well have been removed since.
- sterlind 5y agoI suspect the 24h limit is to prevent angry calls from customers who buy spot instances because they're cheaper, then wonder why their VM randomly went down and blame it on Azure. (I work for Azure but don't know anything about the policies)
- cherioo 5y agoThey probably thought 24 hours limitation can store some design wins; their customers may have proved them wrong.
- YetAnotherNick 5y agoThere are different win for both the approach. I train models on spot VMs which could take more than 24 hours. I set the price to be higher than reserved and there is very slim chance that training could be stopped and I get 80% saving on average. I don't want to spend time writing the complex logic to resume training after spot instance dies. For services though, GCP pre-emptible instances are perfect combo for kubernetes.
- Pirate-of-SV 5y agoNice, one step closer to AWS. Next up I'd like to see an increase to the 30 second termination notice. 120 seconds would be good enough :)
- htrp 5y agoJust clone AWS down to the API endpoints?
- remram 5y agoThey already replicated the S3 API as an alternative to the Google Cloud Storage API: https://cloud.google.com/storage/docs/migrating#migration-simple https://cloud.google.com/storage/docs/migrating#migration-si...
- mcintyre1994 5y agoI get the impression that's pretty common, Cloudflare's new product is S3 compatible too.
- remram 5y agoYeah, S3 is very common. Google Cloud Storage interestingly did not use the S3 API, but then added a limited compatibility layer specifically for "Migrating from Amazon S3".
- ggm 5y agoIs this a sign they have surplus pre-emptible capacity on their architecture for non-premptible VMs, and so worrying, if you think they have enough customers to sustain the model? (google could run negative forever: the point is, some VP won't want to, and the KPI will morph to "kill it")
- Thristle 5y agoDon't worry. Preemtible VMs were used by enough people and this pricing model is 100% profit for the clouds This is just aligning the offering with Azure and AWS
- sudhirj 5y agoNo, all clouds must overprovision their datacenters to handle sudden peak demand. Everybody doubles or tripes their clusters around the holiday season or shopping festivals, for example. For the other 350 days of the year, this capacity often lies unused - so they're auctioned off to the highest bidder (but usually at spot rates much less than the full rent). They're pre-emptible because if you need the servers for something serious/stable/continuous and make an on-demand rent request, the spot instances are pulled off their workloads and given to you at the full rate.
- ggm 5y agoThe overprovisioning makes this kind of product attractive. A small downside is a surge in complaints from customers who experience virtually no pre-empt, and then build a belief it's engines for cheap.. until the machine stops. Somebody once told me a policy of random offswitch helps
- sudhirj 5y agoThat’s probably why Google added the 24h cap, so you don’t get used to the machines being around all the time. Bit like a forced chaos monkey.
- secondcoming 5y agoGreat, now fix your terrible UI.
- bb101 5y agoI find GCP's UI easier to use than AWS' by orders of magnitude.
- secondcoming 5y agoI've found GCP's UI to be a racy mess. If you ask it to do something trivial like removing an instance from an Instance Group, it can show that it has done it when, in fact, it hasn't. Want to switch projects? Better remember to hit F5.
- thundergolfer 5y agoYes, I've seen this myself. It's overall still miles better than AWS UI.
- deepsun 5y agoHow do you switch projects on AWS? In GCP it's a dropdown, in AWS it's completely different account (email or IAM or SAML backed) + captcha + MFA every time if not SAML.
- jSherz 5y agoAWS SSO [1] negates a lot of that pain, but still won't let you have two accounts open in the same browser window. You can use email/password logins or a SAML source like Active Directory. [1]: https://aws.amazon.com/single-sign-on/ https://aws.amazon.com/single-sign-on/
- seabrookmx 5y agoYou must be a Chrome user. It's basically unusable in Firefox or Safari.
- ur-whale 5y agoSo, probably a very naive question here, but how his the "continuity" across pre-emptions working? Say I am running a long batch process on one of these spot VMs and I get pre-empted ... Does my job restart where it was stopped automatically and everything is transparent save how long the job takes to complete, or do I have do to checkpointing myself and deal with the fact that my jobs may be killed at anytime? Also, if the restarts are indeed transparent to my job, what of stateful network connections? Finally, what kind of guarantee do I have that my job will ever complete if pre-emption can happen at an arbitrary frequency for arbitrarily long?
- tecleandor 5y agoRestarting the job is on you, the instance will be destroyed. So you'll need to adapt your process to be resumable (or partially resumable through checkpoints) and/or idempotent, so nothing goes wrong if you run the job (or parts of the job) twice.
- ur-whale 5y agoOK, thanks, that answers my question: there is not continuity whatsoever, you have to take care of everything yourself.
- belval 5y agoSpot instances are the equivalent of stopping an instance while it's running. You get a signal (30 seconds prior for Google, 2 mins for AWS) and you are free to try and handoff the work to a different machine in your cluster . Basically this is good for running short jobs and not long running ones. If you have a service that process chunks of data from a queue it's probably the ideal scenario. In practice, with AWS your instances don't get killed that often. Some in the comments are claiming months but I was using mine with AWS Batch and they usually lived 1-2 weeks.
- bb101 5y agoFrom https://cloud.google.com/compute/docs/instances/preemptible https://cloud.google.com/compute/docs/instances/preemptible: "Spot VMs (Preview) are the latest version of preemptible VM instances. Preemptible VMs continue to be supported for new and existing VMs, and preemptible VMs now use the same pricing model as Spot VMs. However, Spot VMs provide new features that are not supported for preemptible VMs. For example, preemptible VMs can only run for up to 24 hours at a time, but Spot VMs do not have a maximum runtime." So preëmptible VMs are still supported but may now cost as much as 40% of non-preëmptible VMs, "to reflect the supply-demand dynamics of Compute Engine’s excess capacity." That's quite a big change from the current pricing structure.
- bb101 5y agoLooking through our history, it looks like us-east-1 preëmptible VMs were a flat 30% the cost of non-preëmptible VMs. So in the worst-case scenario, we'll be paying 10% more for the same product, but also potentially saving up to 19% in periods where GCP has excess capacity.
- rp1 5y agoYou'll be paying over 30% more in the worst case, just fyi.
- MasterScrat 5y agoWhat kind of instance was that? For A100 servers we got something like 5x price difference. The doc says: > Preemptible VM instances are available at much lower price—a 60-91% discount—compared to the price of standard VMs. Maybe you're using huge disks, those don't get discounts on preemptible instances from what I remember.
- geckbench 5y agoWhy the pricing is changed? The old preemptible VM is around 75% off, but now it is a flexible rate (60% ~ 90%). Wonder if anyone would keep track of this new pricing over the time to see what's the actual discount like.
- sleepytimetea 5y agoThese cannot be created from the Google Cloud Console Web interface - need to programmatically do "stuff". EC2 has it right on their Web Console.