Track and Manage Usage and Cost
To understand the cost associated with a solution deployed in OCI and the potential options to optimize cost against value,ensure you have designed the solution to allow you a structured way to collect usage and performance metrics from the different services. OCI collects a large amount of metrics but, while designing the solution, you should use the available tools to help provide structure around the collected data as well as set up thresholds to trigger alerts related to increases in spending or underutilized resources.
Evaluate the Different Pricing Models
Enterprise Architect, Cloud Architect
If you have a good understanding of your expected usage, the commitment model could provide a lower cost due to discounted service pricing. But if your usage drops or increases significantly then you could end up paying more when using this model.
Implement a Compartment Structure That Fits Your Organization
Infrastructure Architect, Cloud Architect, Enterprise Architect, Security Architect
As a best practice, set up the tenancy to support the way your business works. This will ensure cost and usage data can be viewed and filtered based on dimensions that make sense to your organization. Typically, this involves using compartments as logical containers to house different OCI services. You can map compartments to organizational units, business units, or even individual service and solution owners ,depending on how your business is run.
Set Up Compartment Quota Policies to Control Resource Usage
Infrastructure Architect, Cloud Architect, DevOps Architect
Implement Cost Tracking Tags for Flexible Cost Tracking
Infrastructure Architect, Cloud Architect
By attaching cost-tracking tags to the different resources used, you can query cost data by using tags as filters instead of compartments. This allows more flexibility in where resources are placed and how to query cost data but it also mandates a robust Tagging policy. You don't want to be changing tagging namespaces, tag key names often, as this will cause more complexity when searching and aggregating data.
Tagging examples could be attaching tags like:
Finance.CostCenter:xyz
,
Environment.Type:Production
,Project.Owner:xyz
,
Application.Name:xyz
to the different resources. This would cause
OCI to add the tags to the generated usage and cost data and allow searches based on
these tags.
Tagged namespaces should be protected by IAM Policies to ensure only Tag administrators make changes.
Define Budgets
Enterprise Architect, Cloud Architect
Budgets are set on cost-tracking tags or on compartments (including the root compartment) to track all spending in that cost-tracking tag or for that compartment and its children.
Enable Block Volume Performance Auto Tuning
Infrastructure Architect
Implement Object Storage, Object Lifecycle Management
Infrastructure Architect
- Archive objects to lower cost Archive Storage.
- Delete all objects in a bucket or objects that match the names filters that you specify.
- Delete uncommitted or failed multi-part uploads.
Leverage Cost Reports
Enterprise Architect
The cost report is automatically generated daily, and is stored in an Oracle-owned object storage bucket. It contains one row per each OCI resource (such as instance, object storage bucket, VNIC) per hour, along with consumption information, metadata, and tags. Usage reports generally contain 24 hours of usage data, although occasionally a usage report may contain late-arriving data that is older than 24 hours.
Cost reports are retained for one year.
The file name for each cost report is appended with an automatically incrementing numerical value. The report might contain corrections. Corrections are added as new rows to the report, with the lineItem/iscorrection column set and the referenceNo value of the corrected line populated in the lineItem/backReference column.
Track and Optimize Your Spending by Using Cost Analysis
Enterprise Architect
- Filter costs by dates.
- Filter costs by tags.
- Filter costs by compartments.
- Remove a compartment or tag filter.
- Forecast cost and consumption.
If you created your account prior to January 28, 2019 or you are from outside the United States, other options for tracking and optimizing spending are available.
Implement a Process to Terminate or STOP Unused Resources
Infrastructure Architect, DevOps Architect
Evaluate What Compute Shape Fits Your Workload
Infrastructure Architect, Cloud Architect
A flexible shape allows you to customize the number of OCPUs and the amount of memory when launching or resizing your VM. When you create a VM instance using the flexible shape, you select the number of OCPUs and the amount of memory that you need for the workloads that run on the instance. The network bandwidth and number of VNICs scale proportionately with the number of OCPUs. This flexibility enables you to build VMs that match your workload, allowing you to optimize performance and minimize cost.
Become Familiar with Cloud Advisor
Cloud Architect, Security Architect
Cloud Advisor finds potential inefficiencies in your tenancy and offers guided solutions that explain how to address them. The recommendations help you maximize cost savings and improve the security of your tenancy. The built-in Cloud Guard recommendations help you see and address security vulnerabilities. You can also customize Cloud Advisor by postponing or dismissing recommendations that aren't applicable, allowing you to focus on the recommendations that matter most to you.
The full capabilites and usage of Cloud Advisor are beyond the scope of this Best Practices playbook. For more information on this service, see the "Overview of Oracle Cloud Advisor" referenced in the "Learn More" topic, below.
Learn More
-
Pricing Models (in Infrastructure and Platform Services (IaaS/PaaS) Billing Guide)
- Resource Tags
-
Best Practices for Using Tags to Manage Costs, Operations and Governance (Blog)
- Auto-tune Volume Performance
- Using Object Lifecycle Management
- Overview of Oracle Cloud Advisor