Best Practices for Cloud cost optimization
- No Comments
10 Best Practices
1. Tag all your resources to know where the money is spent
2. Use consolidated billing to avail volume discount across accounts
3. Automate resource life cycle
4. Right size your resources
5. Choose right pricing model based on usage
6. Measure and monitor your resources
7. Delete unused/orphan volumes
8. Match usage to storage class
9. Increase elasticity, through automation
10. 80% of your cloud cost will be attributed to compute and storage resources, target to optimize them first.
1).Tag all your resources to know where the money is spent
Tagging must be done to all the resources and it is important to do so.
Tagging or resources can either be by project name or by department name or by person using that resource.
Cloud providers are always there to provide the tagged and untagged resources. Concentrate on the resources that are not tagged. Take out this report periodically and take the action necessary to ensure where actually is your spent or who is spending the money.
2).Use consolidated billing to avail volume discount across accounts
Most of the organizations will have more than one cloud accounts. If they combine these together and pay money through one payer account they can avail discounts for the usage all together and the cloud providers gives you discount mainly on volumes so that more you consume, the price that you pay comes down. Therefore consolidate billing avail discounts on whatever you are consuming.
3).Automate resource life cycle
Our resources such as servers are created, provisioned and then we forget to utilize them which accounts for cost reduction. What if there is something to cut down a particular server when not in use and raise a server up when it is to be used. This is called as automating servers and automates a server/resources of starting and terminating whenever it is up or down in usage respectively. Ansible is the best Automating tool.
4).Right size your resources
Maintain you servers properly: If you are having a huge server and say it costs about $4 an hour and if you are using 20% or 30% of this huge server, you would land up in spending more money unnecessarily. Instead you can reduce the size of the server and in place of spending $4 on the usage, it would rather cost you less than $4, may be $1.5 or $2. This is called as RightSizing and its worth doing it.
Ensure that all of the Virtual Machines that are in your infrastructure are allocated the correct resources for their workload
In case of instances select the cheapest instance that serve you needs and also look at the CPU, RAM, Storage and network utilization to identify instances that could be downsized.
5).Choose right pricing model based on usage
Now all the cloud platforms have various prizing models for their services and they do allow on-demand price v/s a reserved price.
In terms of compute options and configurations, Reserved Instances and On Demand instances are the same. The only difference between the two is that a Reserved Instance is one you rent (“reserve”) for a fixed duration, and in return you receive a discount on the base price of an On Demand instance.
If I know something that is going to run for a very long time(in a production environment) then I can reserve that particular capacity. As soon as I reserve that, I can get 40% discount, 50% discount as well and then there are options for spot instances(dedicated instance) and its pricing would defer.
Therefore working with your cloud partner, account manager or the provider to see what pricing model is right for your usecase.
6).Measure and monitor your resources
We should think before the usage of any resources.
It is imperative to measure and monitor the resources. We should think about below scenarios:
Am I really conasuming for what I have provisioned ? What is extent of consumption ?
If we dint follow the above scenarios then you must talk to the person who provisioned it and see if we can reduce what we have provisioned.
If Cloud gives you 1GB RAM that you want, but do you really need that full 1GB ?
Therefore it is very imp to measure what we have provisioning and then monitor it and take necessary actions.
7).Delete unused/orphan volumes
There are chances that we may not use the resources that are present and which also costs you money.
Resources such as IP Addresses, Load balancers and storage devices may be unused or unallocated and they account adding money to your monthly bill. So, note them and get rid of them as soon as possible or make sure you assign them to someone else so that they make use of it and be productive.
In the figure below to your left, server load can be handled by 1 instance so you can turn off 2nd instance to save the cost. During the next 8 hours server load increases and requires two instances. Again, server load decreases from 16 to 24 and you can turn off 2nd instance.
8).Match usage to storage class
In cloud we can get storage of 1TB for $4 and also for $100 which depends on the usecase.
For example: If I really want to archive something it would be like why should I opt for the service that is specially designed for specific usecase and costing least amount of money v/s using that which costs you more only for archiving data.
Therefore choose wisely between your usecase and always reach out to your cloud account manager to help you with choosing the above scenario.
9).Increase elasticity, through automation
Elasticity is the ability to grow or shrink infrastructure resources dynamically as needed to adapt to workload changes in an autonomic manner, maximizing the use of resources. This can result in savings in infrastructure costs overall.
Scale Up and Scale down the resources whenever they are required and not in use respectively. For such a system Automation makes the task easier.
10).80% of your cloud cost will be attributed to compute and storage resources, target to optimize them first
Target first on those that accounts to cost more. Compute and storage resources such as servers and volumes costs you more so its better to Concentrate on them more than any other resources. Our first priority in maintain g should be for this field. We have to understand where actually the money is been spent in this field, try understanding it and if they are not in use delete them or make anyone else to work with them so as minimize 80% of the cost that actually account in this field.