Preemptible Instance Restart Questions

2,728 views
Skip to first unread message

Ed

unread,
Nov 14, 2017, 1:12:18 AM11/14/17
to gce-discussion
I have a couple of questions about preemtible instances I could not find documentation about.

1. When an instance is preempted do I need to manually restart it and will I be notified?

2. Generally how long is an instance down before it is or can be restarted?

Michael Basilyan

unread,
Nov 14, 2017, 1:17:05 AM11/14/17
to Ed, gce-discussion
Hi Ed,

>> 1. When an instance is preempted do I need to manually restart it and will I be notified?

Yes - a "preemption" results in a stopped/TERMINATED (but not deleted) instance. You may restart it after it's stopped. You will be notified in the form of a ACPI G2 Soft Off signal and your VM's shutdown script should run. You can learn more about the process here.

>> 2. Generally how long is an instance down before it is or can be restarted?

--
© 2017 Google Inc. 1600 Amphitheatre Parkway, Mountain View, CA 94043
 
Email preferences: You received this email because you signed up for the Google Compute Engine Discussion Google Group (gce-discussion@googlegroups.com) to participate in discussions with other members of the Google Compute Engine community and the Google Compute Engine Team.
---
You received this message because you are subscribed to the Google Groups "gce-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gce-discussion+unsubscribe@googlegroups.com.
To post to this group, send email to gce-discussion@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gce-discussion/3a51de16-d253-48f4-80e5-3cbc817eefc3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Faraz Hussain

unread,
Nov 14, 2017, 10:07:47 AM11/14/17
to gce-discussion
I generally have not had a problem restarting a preempted instance immediately. But it makes me wonder why it was preempted if capacity is available to restart a new one? Am I missing something about preemption?

Are there times when I can not restart a preempted instance for hours or more?


On Tuesday, November 14, 2017 at 1:17:05 AM UTC-5, Michael Basilyan wrote:
Hi Ed,

>> 1. When an instance is preempted do I need to manually restart it and will I be notified?

Yes - a "preemption" results in a stopped/TERMINATED (but not deleted) instance. You may restart it after it's stopped. You will be notified in the form of a ACPI G2 Soft Off signal and your VM's shutdown script should run. You can learn more about the process here.

>> 2. Generally how long is an instance down before it is or can be restarted?

There is no limit. You can try right away. 

Check out these two docs:
Thanks,
Mike

On Mon, Nov 13, 2017 at 10:58 PM, Ed Stewart <edst...@gmail.com> wrote:
I have a couple of questions about preemtible instances I could not find documentation about.

1. When an instance is preempted do I need to manually restart it and will I be notified?

2. Generally how long is an instance down before it is or can be restarted?
Email preferences: You received this email because you signed up for the Google Compute Engine Discussion Google Group (gce-dis...@googlegroups.com) to participate in discussions with other members of the Google Compute Engine community and the Google Compute Engine Team.

---
You received this message because you are subscribed to the Google Groups "gce-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gce-discussio...@googlegroups.com.
To post to this group, send email to gce-dis...@googlegroups.com.

Michael Basilyan

unread,
Nov 14, 2017, 10:10:58 AM11/14/17
to Faraz Hussain, gce-discussion
Yes you should not assume that just because you were preempted that you will not be able to get another PVM. Our regions are very large and complex and things are changing. 

Having said that, it is possible for there to be a situation where Preemptible VMs are not available. Though historically this has been relatively rare. This is why they are excluded from the Compute Engine SLA (From the docs: Caution: Due to the limitations of preemptible instances, preemptible instances are not covered by any Service Level Agreement (and, for clarity, are excluded from the Google Compute Engine SLA).])


Email preferences: You received this email because you signed up for the Google Compute Engine Discussion Google Group (gce-discussion@googlegroups.com) to participate in discussions with other members of the Google Compute Engine community and the Google Compute Engine Team.

---
You received this message because you are subscribed to the Google Groups "gce-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gce-discussion+unsubscribe@googlegroups.com.
To post to this group, send email to gce-discussion@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gce-discussion/e9f4566a-d7e6-41f4-8cbb-85ce217ec6a0%40googlegroups.com.

Faraz Hussain

unread,
Nov 14, 2017, 10:22:42 AM11/14/17
to gce-discussion
Thanks, that is good to know that is it is rare when premptible VMs are not available! I fully understand they are not covered by the SLA. My application is fault tolerant so they work great for me.

Ed

unread,
Nov 14, 2017, 8:59:41 PM11/14/17
to gce-discussion
Thanks, Mike. Do you know if there is a way to know when an instance has been preempted? Ideally some notification such as email would be ideal otherwise do I just need to keep checking to see if it is still running.

Ed


On Tuesday, November 14, 2017 at 1:17:05 AM UTC-5, Michael Basilyan wrote:
Hi Ed,

>> 1. When an instance is preempted do I need to manually restart it and will I be notified?

Yes - a "preemption" results in a stopped/TERMINATED (but not deleted) instance. You may restart it after it's stopped. You will be notified in the form of a ACPI G2 Soft Off signal and your VM's shutdown script should run. You can learn more about the process here.

>> 2. Generally how long is an instance down before it is or can be restarted?

There is no limit. You can try right away. 

Check out these two docs:
Thanks,
Mike

On Mon, Nov 13, 2017 at 10:58 PM, Ed Stewart <edst...@gmail.com> wrote:
I have a couple of questions about preemtible instances I could not find documentation about.

1. When an instance is preempted do I need to manually restart it and will I be notified?

2. Generally how long is an instance down before it is or can be restarted?
Email preferences: You received this email because you signed up for the Google Compute Engine Discussion Google Group (gce-dis...@googlegroups.com) to participate in discussions with other members of the Google Compute Engine community and the Google Compute Engine Team.

---
You received this message because you are subscribed to the Google Groups "gce-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gce-discussio...@googlegroups.com.
To post to this group, send email to gce-dis...@googlegroups.com.

Michael Basilyan

unread,
Nov 14, 2017, 9:34:49 PM11/14/17
to Ed, gce-discussion

Sadly we don't send an email. Though you can probably use the shutdown script to trigger something else to send an email. 

Thanks,
Mike


Email preferences: You received this email because you signed up for the Google Compute Engine Discussion Google Group (gce-discussion@googlegroups.com) to participate in discussions with other members of the Google Compute Engine community and the Google Compute Engine Team.

---
You received this message because you are subscribed to the Google Groups "gce-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gce-discussion+unsubscribe@googlegroups.com.
To post to this group, send email to gce-discussion@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gce-discussion/e63b2195-7e7d-4929-b46e-45b675376431%40googlegroups.com.

Krish M

unread,
Nov 27, 2017, 9:36:49 AM11/27/17
to gce-discussion
Why doesn't a preempted instance auto start, whenever there is an availability of the resources ? As Mr. Faraz H, rightly pointed out "But it makes me wonder why it was preempted if capacity is available to restart a new one? Am I missing something about preemption?"

I might be missing few hours of compute time till I press the restart button. So is compute Engine's unused resource. ?

Michael Basilyan

unread,
Nov 27, 2017, 2:17:05 PM11/27/17
to Krish M, gce-discussion
You can try and use managed instance groups to detect that an instance is down/preempted and automatically recreate it from a template. 



Email preferences: You received this email because you signed up for the Google Compute Engine Discussion Google Group (gce-discussion@googlegroups.com) to participate in discussions with other members of the Google Compute Engine community and the Google Compute Engine Team.

---
You received this message because you are subscribed to the Google Groups "gce-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gce-discussion+unsubscribe@googlegroups.com.
To post to this group, send email to gce-discussion@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gce-discussion/5744e414-f39f-4a12-a829-47a01ee94f23%40googlegroups.com.

Paul Nash

unread,
Nov 28, 2017, 12:38:04 AM11/28/17
to Michael Basilyan, Krish M, gce-discussion
Krish,

There is no guarantee that a restart would succeed, or a way for us to know that this is what the user would want. Most users have a layer of workload management software helping them allocate VMs and assign work, so reacting appropriately to a preemption is often best done by your software in whatever manner is best for your application.

--
© 2017 Google Inc. 1600 Amphitheatre Parkway, Mountain View, CA 94043
 
Email preferences: You received this email because you signed up for the Google Compute Engine Discussion Google Group (gce-discussion@googlegroups.com) to participate in discussions with other members of the Google Compute Engine community and the Google Compute Engine Team.
---
You received this message because you are subscribed to the Google Groups "gce-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gce-discussion+unsubscribe@googlegroups.com.
To post to this group, send email to gce-discussion@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--

Paul R. Nash | Group Product Manager, Compute Engine | paul...@google.com | 206-876-1620

Krish M

unread,
Nov 28, 2017, 8:58:28 AM11/28/17
to gce-discussion
Thank you.!
Reply all
Reply to author
Forward
0 new messages