Preemptible Instances

Preemptible instances behave the same as regular compute instances, but the capacity is reclaimed when it's needed elsewhere, and the instances are terminated. If your workloads are fault-tolerant and can withstand interruptions, then preemptible instances can reduce your costs. For example, you can use preemptible instances to optimize costs for workloads that can tolerate interruptions, such as tests that can be stopped and resumed later.

How Preemptible Instances Work

Preemptible instances are designed for short-term usage. The capacity is reclaimed when it's needed elsewhere. The capacity is not guaranteed for a minimum amount of time, so instances can be reclaimed at any time. The benefit is that preemptible capacity costs less than on-demand capacity. Therefore, for workloads that can be interrupted, preemptible capacity can lower your costs.

Using Preemptible Capacity

To use preemptible capacity, follow the standard process for creating an instance, and for Capacity type, select Preemptible capacity.

When preemptible capacity is reclaimed, the instance is terminated. Use the Events service to receive notifications when this event occurs.

Support and Limitations

Preemptible instances have the following limitations and restrictions:

  • Preemptible instances can be terminated at any time. As a result, they are not suitable for long-running workloads.
  • Preemptible capacity cannot be used with capacity reservations or with the dedicated virtual machine host feature.
  • Preemptible capacity does not support bare metal instances, burstable instances, or instances that have a minimum billing time.
  • When you edit an instance that uses preemptible capacity, only the name of the instance can be changed. You cannot change the shape of the instance after it is launched, and you cannot convert a preemptible instance to an on-demand instance.
  • After you launch a preemptible instance, you cannot start, stop, or reboot the instance.
  • Preemptible instances do not support sending diagnostic interrupts.
  • You cannot use preemptible instances to create instance configurations, and preemptible instances cannot be used in instance pools.
  • Preemptible instances don't support instance migration after infrastructure maintenance events. During maintenance events that impact the underlying infrastructure, the capacity is reclaimed, and the instance is terminated.
  • The standard compute instance service limits and compartment quotas apply to preemptible instances. If your request for compute instances exceeds your service limits, request a service limit increase before you create the instance. For more information, see Service Limits.

Supported Shapes and Images

The following shapes support preemptible instances.

  • VM.Standard.E3.Flex series (Standard – E3 series)
  • VM.Standard2 series (Virtual Machine Standard – X7 series)

Billing and Cost Management

Preemptible capacity costs 50% less than on-demand capacity in all regions.

Tracking Instance Preemption Events

You can use the Events service to receive notifications when a preemptible instance is terminated. An instancepreemptionaction event is emitted thirty seconds before the instance termination begins. For details about instance preemption event types and an example event, see Instance Event Types.

For background information about creating automation to track events and steps to create event notifications, see Getting Started with Events.

To create an event notification for when a preemptible instance is terminated, when you create the event rule, do the following:

  1. For Condition, select Event Type.
  2. For Service Name, select Compute.
  3. For Event Type, select Instance - Preemption Action.

You can also use the Events service to invoke a function when a preemptible instance is terminated.

Tagging Resources

You can apply tags to your resources to help you organize them according to your business needs. You can apply tags at the time you create a resource, or you can update the resource later with the wanted tags. For general information about applying tags, see Resource Tags.

Using the Console

Use the Console to manage preemptible instances.

To create a preemptible instance
  1. Perform the initial steps to create an instance.
  2. In the Placement section, click Show advanced options.
  3. For Capacity type, select Preemptible capacity.
  4. Choose whether to permanently delete the attached boot volume when the capacity is reclaimed.
  5. Finish creating your instance, and then click Create.
To edit preemptible instances

When you edit an instance that uses preemptible capacity, only the name of the instance can be changed. You cannot change the shape of the instance after it is launched, and you cannot convert a preemptible instance to an on-demand instance.

  1. Open the navigation menu and click Compute. Under Compute, click Instances.
  2. Click the instance that you're interested in.
  3. Click Edit.
  4. Enter a new name. Avoid entering confidential information.
  5. Click Save Changes.
To stop preemptible instances

Preemptible instances cannot be started, stopped, or rebooted.

To monitor costs

In the Console, you can access cost and usage reports to see the breakdown of costs for your preemptible instances, and you can use the cost analysis feature to track and optimize your spending.

  • To view cost and usage reports: Open the navigation menu and click Governance & Administration. Under Cost Management, click Cost and Usage Reports. For more information, see Accessing Cost and Usage Reports.
  • To view cost analysis: Open the navigation menu and click Governance & Administration. Under Cost Management, click Cost Analysis. For details instructions explaining how to work with the cost analysis tool, see Cost Analysis Overview.

In the cost and usage report, for preemptible instances, the description column includes the word Preemptible. The report shows the bill rate per hour for each resource. If the capacity is reclaimed in less than a minute, you are not charged for that time.