Oracle Cloud A1 Free Tier: Was Your Instance Resized?
In this article
This article explains how to check whether your Oracle Cloud Infrastructure (OCI) Always Free A1 instance has been resized, and what to do if it has. You can verify the current shape and OCPU/RAM allocation in the OCI console under your instance details, and compare it against your original configuration. If the instance shows a different shape or resource count than you set, it was likely resized by Oracle due to capacity constraints or a maintenance event.
Background: The A1 Flex Shape and Free Tier Limits
Oracle Cloud's Always Free tier includes a generous allocation for ARM-based instances using the A1 Flex shape. You get a total of 4 OCPUs and 24 GB of memory across all your A1 instances, which you can split into multiple VMs. For example, you could create one instance with 4 OCPUs and 24 GB, or four instances each with 1 OCPU and 6 GB. The A1 shape uses Ampere Altra processors and is popular for running lightweight web servers, Docker containers, and development environments.
Because the free tier is subject to capacity availability, Oracle occasionally resizes or stops idle instances. This is more common in regions with high demand. If an instance is resized, it typically means Oracle reduced its OCPU or RAM to free up capacity, but it could also be a change to a different shape (though less common). Knowing how to detect this change is important because your workloads may behave differently with fewer resources.
How to Check Your Instance's Current Shape and Size
The quickest way to see if your A1 instance was resized is to look at its configuration in the OCI console. Follow these steps:
- Log in to the OCI console and navigate to Compute > Instances.
- Click on the name of your A1 instance to open its details page.
- Under the Instance Information tab, find the Shape field. It should display something like
VM.Standard.A1.Flex. Next to it, you'll see the configured OCPUs and memory (e.g.,4 OCPUs, 24 GB RAM). - Compare this with what you originally set. If the numbers are lower, your instance was resized.
You can also check the OCI CLI or API for a more programmatic view. Using the CLI, run:
oci compute instance get --instance-id <your-instance-ocid>
The output includes a shape-config object with ocpus and memory-in-gbs values. If those don't match your original launch configuration, the instance was resized.
How to Detect Resizing from Inside the Instance
If you don't have console access, you can check from the operating system. The number of virtual CPUs and total memory visible to the OS will reflect the current allocation. On Linux, run:
nproc
free -h
If nproc shows fewer cores than you originally allocated, or free shows less RAM, the instance was resized. However, note that the OS may not show the exact OCPU count if hyperthreading is involved; A1 Flex uses one OCPU per core, so nproc should match the OCPU count. This method is useful if you've lost access to the console or want a quick sanity check.
Common Reasons for Resizing and What to Do
Oracle may resize an A1 instance for several reasons:
- Capacity constraints: In high-demand regions, Oracle might reduce resources on Always Free instances to accommodate paying customers.
- Maintenance events: During hardware maintenance, instances may be migrated to different hosts, and the shape could be adjusted.
- Idle resource reclamation: Oracle has a policy of stopping or reclaiming resources from instances that are idle for extended periods (e.g., 7 days of low CPU usage). This might involve a resize rather than a full stop.
If you find your instance was resized, you have a few options:
- Accept the change and adjust your workloads to fit the new resources.
- Try to resize it back manually by editing the instance (if the console allows it). Go to Instance Details > Edit and change the OCPU/RAM. This may fail if capacity is unavailable.
- Move to a different availability domain or region where capacity is more plentiful. You can create a custom image of your instance and launch it elsewhere.
It's important to note that resizing does not affect your data; the boot volume and block volumes remain intact. However, you may need to reconfigure applications that rely on a specific number of CPUs or memory.
How to Prevent Unwanted Resizing
While you can't fully prevent Oracle from resizing due to capacity, you can reduce the likelihood by keeping your instance active. Oracle's idle reclamation policy targets instances with low CPU utilization for 7 days. To avoid this:
- Run a lightweight process that generates minimal but consistent CPU usage (e.g., a cron job that does a small computation every minute).
- Ensure your instance is not stopped; stopped instances are more likely to be reclaimed.
- Consider setting up a simple web server or monitoring script that pings your instance regularly.
However, these measures are not guaranteed. Oracle's terms state that Always Free resources may be reclaimed at any time, and you should design your workloads to be resilient to such changes.
Frequently Asked Questions
Will I be notified if my instance is resized?
Oracle does not typically send a direct notification for resizing events. You might see a service health notification in the console if it's related to maintenance, but for capacity-based resizing, there is usually no alert. You need to check the instance configuration manually.
Can I resize my A1 instance back to its original size?
Yes, you can attempt to edit the instance and increase the OCPU/RAM back to your desired values. However, this is subject to capacity availability. If the region is full, you may get an error saying the shape is unavailable. Try later or in a different availability domain.
Does resizing affect my IP address or DNS?
No, resizing does not change the instance's public or private IP addresses, nor does it affect your DNS settings. The instance is simply reconfigured with different resources, but the network identity remains the same.
Is there a way to monitor for resizing automatically?
You can use OCI's monitoring service to track CPU and memory metrics over time. If you see a sudden drop in the number of CPUs or memory available, that could indicate a resize. You can also write a script that periodically checks nproc and free and alerts you if values change.
What if my instance was resized to zero OCPUs?
If your instance shows 0 OCPUs, it is likely stopped or terminated. A running instance must have at least 1 OCPU. If you see 0, check the instance state; it may have been stopped due to idle reclamation. You can start it again, but you may need to resize it to a valid shape first.
Does resizing affect my free tier eligibility?
No, as long as your total A1 usage stays within the 4 OCPU and 24 GB limits, you remain eligible for the Always Free tier. Resizing one instance down doesn't change your overall entitlement; you can still use the freed resources on other instances.
Conclusion
Detecting a resize on your Oracle Cloud A1 free tier instance is straightforward: check the shape and resource counts in the console or from inside the OS. While resizing is rare, it can happen due to capacity or idle reclamation. By staying informed and keeping your instance active, you can minimize surprises. If you do encounter a resize, remember that your data is safe, and you can often adjust your configuration to restore the original size when capacity allows.