Capacity Reservations

Capacity reservations enable you to reserve instances in advance so that the capacity is available for your workloads when you need it. Capacity reservations provide the following benefits:

  • Assurance that you have the capacity necessary to manage your workload. Reserved capacity is available for your tenancy to consume at any time.
  • No size or time commitments. Create a reservation with as little or as much capacity as you need, and delete the reservation at any time to stop paying for it.

Capacity reservations are helpful in the following scenarios:

  • Disaster recovery: Ensure that capacity is available when you need to failover to your secondary location.

  • Unplanned growth: Reserve capacity as a buffer for unexpected workload spikes.

  • Planned migrations and new launches: When you have large capacity requirements for migrations or new project launches, capacity reservations ensure that you'll have the capacity that you need.

  • Committed capacity for long-running projects: When maintenance or seasonal adjustments cause your usage to vary, capacity reservations provide the needed capacity.

How Reserved Capacity Works

Capacity reservations allow you to reserve compute capacity in advance and use this capacity when you launch instances against the reservation. There is no minimum time or size commitment. You can create, modify, and terminate your capacity reservation at any time. When instances that use the reserved capacity are terminated, the capacity is returned to the reservation, and the unused capacity in the reservation increases. Unused reserved capacity is metered differently than used reserved capacity. For more information, see the Oracle Compute Cloud Services section of Oracle PaaS and IaaS Universal Credits Service Descriptions.

Using Reservations

When you create your capacity reservation, you specify the availability domain in the tenancy where you want to reserve capacity. You can then add a capacity configuration, which defines the amount of space that you want to reserve and the shape to use when launching instances against that capacity configuration. Optionally, you can specify the fault domain to reserve capacity in. Each capacity reservation can have multiple capacity configurations.

To use reserved capacity, specify the reservation ID when launching an instance. The instance being launched must have the same availability domain, instance shape, and fault domain as one of the capacity configurations in the reservation. As an advanced option, you can create default reservations, which allow you to configure your capacity reservation once for the availability domain within the root tenancy and use this reservation every time you launch an instance in that availability domain and tenancy. When instances that use reserved capacity are terminated, the capacity is returned to the reservation. When instances that use reserved capacity are stopped, the capacity is held by that instance for use when that instance is restarted.

Use instance pools to launch multiple instances that use reserved capacity at the same time. In the API, specify the capacity reservation ID in the instance configuration for the instance pool. In the Console, the reservation is automatically applied to the instance pool based on the instance configuration. As long as sufficient capacity is available, the instance pool launches instances using capacity from the associated reservation. You can also use the instance pool to simultaneously stop, start, or terminate multiple instances that use capacity from the associated reservation.

Support and Limitations

Capacity reservations have the following limitations and restrictions:

  • When you create your capacity reservation, you specify the availability domain in the tenancy where you want to reserve capacity. Reservations are specific to that availability domain and tenancy. They cannot be shared between availability domains and tenancies, and they do not span entire regions and realms.
  • Capacity reservations cannot be moved from one availability domain to another, nor can they be moved from one tenancy to another.
  • Capacity reservations are not available with Free Tier accounts.
  • Capacity reservations cannot be used with the dedicated virtual machine host feature.
  • Capacity reservations do not support burstable instances.
  • Capacity is allocated when the reservation is created. If there isn't enough capacity to complete the request, the reservation is not made, and an error occurs.
  • Capacity reservations cannot have more than 30 capacity configurations. See Creating more than 30 capacity configurations results in an internal error.
  • After you create a capacity configuration for a flexible shape, you cannot change the number of OCPUs or amount of memory assigned to the instances in that configuration. To include instances with a different number of OCPUs or amount of memory, create new capacity configurations in the reservation.
  • In order to move an instance that uses on-demand capacity into a capacity reservation, the reservation must contain a capacity configuration for that shape, and the capacity configuration must contain enough unused capacity to accommodate the instance. If the capacity configuration doesn't have sufficient capacity for the instance, add capacity before moving the instance into the reservation.
  • Service limits and compartment quotas apply to reserved capacity. If your request for reserved capacity exceeds your service limits, request a service limit increase before you reserve the capacity. For more information, see Service Limits. Capacity reservations have two known issues with service limits: No service category for capacity reservations when requesting service limit increases and Capacity reservation service limits inaccurate.

Billing and Cost Management

When you create a reservation, you are immediately charged for the reserved resources. When you no longer need a reservation, delete the reservation to stop incurring charges. Because reservations consume resources, reserved capacity incurs charges even when the capacity is unused. Unused reserved capacity is metered differently than used reserved capacity.

Required IAM Policy

To use Oracle Cloud Infrastructure, you must be granted security access in a policy  by an administrator. This access is required whether you're using the Console or the REST API with an SDK, CLI, or other tool. If you get a message that you don’t have permission or are unauthorized, verify with your administrator what type of access you have and which compartment  to work in.

For administrators: The following examples shows typical policies that gives access to capacity reservations. Create the policy in the tenancy so that the access is easily granted to all compartments by way of policy inheritance. To reduce the scope of access to just the autoscaling configurations in a particular compartment, specify that compartment instead of the tenancy.

Type of access: Ability to launch an instance in a reservation.

Allow group <group_name> to use compute-capacity-reservations in tenancy

Type of access: Ability to manage capacity reservations.

Allow group <group_name>  manage compute-capacity-reservations in tenancy

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.

Advanced Options

In addition to the standard capacity reservation features, advanced configuration options are available, such as default capacity reservations.

Default Capacity Reservations

With default reservations, you can configure your capacity reservation once and use this reservation every time you launch an instance in the availability domain and tenancy associated with the default reservation. To create a default reservation, when you create the capacity reservation, select the option to use this reservation as the default reservation. After you create the default reservation, all instances launched in that availability domain and tenancy use capacity from this reservation if possible.

Sometimes the instance cannot be launched using capacity from the default reservation. For example, the reservation might not have sufficient capacity, or the user might not have permission to use the reservation. In those situations, the instance is launched using on-demand capacity.

Requirements

To use default reservations:
  • The default capacity reservation must be in the root compartment.
  • You can only have one default reservation in each availability domain.
  • You must grant users who launch instances permission to use this reservation. For more information, see Required IAM Policy.

Using the Console

Use the Console to manage capacity reservations and capacity configurations. Capacity reservations can have multiple capacity configurations within them.

Managing Capacity Reservations

In the Console, you can create and edit capacity reservations, launch and stop instances in a capacity reservation, and move instances in and out of capacity reservations.

To create a capacity reservation

For large capacity reservations, contact support. For smaller capacity reservations, follow these steps.

  1. Open the navigation menu and click Compute. Under Compute, click Capacity Reservations.
  2. Click Create Capacity Reservation.
  3. In the Add Basic Details step, make the following selections, and then click Next.
    • For Name, enter a name for the capacity reservation.
    • For Create in Compartment, select the compartment for the reservation and all instances created with this reservation.
    • For Availability Domain, select the availability domain for the reservation and all instances created with this reservation.
    • To make this the default reservation, select Make this capacity reservation the default for this availability domain. If selected, when an instance is launched in this availability domain, it counts against this reservation, regardless of which compartment the instance is in. If a different capacity reservation is already set as the default in this availability domain, this capacity reservation replaces it as the default.
  4. In the Add Capacity Configuraitons step, create one or more capacity configurations. In the Capacity Configuration dialog, make the following selections, and then click Next.
    • For Fault Domain, enter a fault domain. Alternately, you can select First available instead of a specific fault domain.
    • For Shape, select the shape to use for instances launched against this capacity configuration. If you select a flexible shape, enter values for Cores and Memory (in GB).
    • For Count, enter the total number of instances that can be launched with this capacity configuration.
    • Optionally, click + Another Shape, and repeat this step. To remove a row, click the Remove (x) button.
  5. Review the capacity reservation and capacity configuration information, and then click Create.
To edit a capacity reservation

You can change the name of the capacity reservation, and you can decide whether the reservation should be the default reservation.

  1. Open the navigation menu and click Compute. Under Compute, click Capacity Reservations.
  2. In the list of capacity reservations, click the capacity reservation that you want to edit. The Capacity Reservation Details page opens.
  3. On the Capacity Reservation Details page, click Edit. The Edit Capacity Reservation dialog opens.
  4. In the Edit Capacity Reservation dialog, change either of the following fields, and then click Save Changes.
    • Name: Enter a new name value.
    • Select or clear Make this reservation the default for this availability domain.
To delete a capacity reservation
  1. Open the navigation menu and click Compute. Under Compute, click Capacity Reservations.
  2. In the list of capacity reservations, click the capacity reservation that you want to delete. The Capacity Reservation Details page opens.
  3. On the Capacity Reservation Details page, click Delete. A confirmation dialog opens.
  4. In the Delete Reservation dialog, click Delete Reservation.
To launch instances in a capacity reservation
  1. Follow the steps for creating a Linux instance or for creating a Windows instance.
  2. In the Placement section, click Show Advanced Options.
  3. For Capacity type, select Capacity Reservation.
  4. For Capacity reservation in <compartment name>, select the desired capacity reservation from the drop-down menu.
  5. When you finish configuring the instance, click Create.
To move instances into a capacity reservation
  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. In the Edit Instance pane, click Show Advanced Options.
  5. In the Placement tab, select Apply a capacity reservation.
  6. For Capacity reservation in <compartment name>, select the desired capacity reservation from the drop-down menu.
  7. Click Save Changes.
To move instances out of a capacity reservation
  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. In the Edit Instance pane, click Show Advanced Options.
  5. In the Placement tab, clear Apply a capacity reservation, and then click Save Changes.

Managing Capacity Configurations

You can add and edit capacity configurations in the Console. Each capacity configuration must be unique within the reservation. Multiple configurations with the same fault domain and instance shape are not allowed.

To add a capacity configuration
  1. Open the navigation menu and click Compute. Under Compute, click Capacity Reservations.
  2. In the list of capacity reservations, click the capacity reservation that you want to add a capacity configuration to. The Capacity Reservation Details page opens.
  3. Under Capacity Configurations, click Add Capacity Configuration.
  4. In the Add Configuration pane, make the following selections, and then click Add Configuration.
    • For Fault Domain, enter a fault domain. Alternately, you can select First available instead of a specific fault domain.
    • For Shape, select the shape to use for instances launched against this capacity configuration. If you select a flexible shape, enter values for Cores and Memory (in GB).
    • For Count, enter the number of instances that can be launched with this capacity configuration.
    • Optionally, click + Another Shape, and repeat this step. To remove a row, click the Remove (x) button.
To edit a capacity configuration
  1. Open the navigation menu and click Compute. Under Compute, click Capacity Reservations.
  2. In the list of capacity reservations, click the capacity reservation that you want to edit. The Capacity Reservation Details page opens.
  3. Under Capacity Configurations, click the Actions icon (Actions icon) associated with the configuration that you want to edit, and then click Edit.
  4. In the Edit Configuration pane, for Count, enter a new value. The count value cannot be less than the number of instances currently launched in this configuration.
    Note

    The fault domain and shape of capacity configurations cannot be changed. To reserve capacity for different fault domains or shapes, add a new capacity configuration.
  5. Click Save Changes.
To delete a capacity configuration and release capacity
  1. Open the navigation menu and click Compute. Under Compute, click Capacity Reservations.
  2. In the list of capacity reservations, click the capacity reservation that you want to release all capacity from. The Capacity Reservation Details page opens.
  3. Under Capacity Configurations, click the Actions icon (Actions icon) associated with the configuration that you want to edit, and then click Delete Configuration.
  4. In the Delete Configuration and Release Capacity dialog, click Delete Configuration. This change deletes the capacity configuration and releases the associated capacity from the reservation.

Monitoring Capacity Reservations

Monitor capacity usage and see the costs associated with your capacity reservation.

To view capacity usage
  1. Open the navigation menu and click Compute. Under Compute, click Capacity Reservations.
  2. In the list of capacity reservations, click the capacity reservation that you're interested in. The Capacity Reservation Details page opens.
  3. Under Capacity Configurations, you can see the total reserved capacity and the total used capacity for each configuration.
To monitor costs

In the Console, you can access cost and usage reports to see the breakdown of costs for your capacity reservation, 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 capacity reservations, the product/Description column includes the words Capacity Reservation. If no capacity remains in the reservation because instances have been launched against all of the reserved capacity, the cost for the capacity reservation is zero. Launched instances are billed at the standard rate for the given shape.

The report shows the bill rate per hour for each resource. Resources are aggregated by the number of cores.

  • Unused reserved capacity is billed at 85%. Instances launched against a capacity reservation are billed at 100%.
  • If you launch an instance against a capacity reservation thirty minutes into the hour, you're billed at the reserved capacity rate for the first half of the hour and at the standard rate for the second half of the hour. These rates appear as separate line items.
  • When an instance is launched from reserved capacity at the beginning of an hour for the whole hour, the launched instance is billed at the standard rate for the full hour.

For example, you have a capacity reservation with capacity for a single instance that uses one core. Fifteen minutes into the hour, you launch an instance against that reservation. The cost and usage report has two lines for this reservation:

  • The first line shows reserved capacity billed at 85% for 15 minutes. The number in the usage/billedQuantity column is calculated by multiplying 85% by ¼ of an hour and the number of cores.
  • The second line shows a standard instance billed at 100% for 45 minutes. The number in the usage/billedQuantity column is calculated by multiplying 100% by ¾ of an hour and the number of cores.

In the cost analysis report, the bar chart shows costs associated with capacity reservations. The legend indicates which bars represent capacity reservations. If no capacity remains in the reservation because instances have been launched against all of the reserved capacity, the cost for the capacity reservation is zero. Launched instances are billed at the standard rate for the given shape and are grouped with standard instances in the chart.

Using the API