Cloud cost optimization on GCP
Google Cloud Platform (GCP) is a major public cloud provider offering prices that are more competitive and inherent than many other cloud providers. Our blog will attempt to provide insights on how GCP facilitates simplified cloud cost management methods, implements efficient cost-saving techniques and utilizes policy-driven automation to encourage diminished cloud bills.
Although GCP is less expensive in comparison to AWS, companies are nevertheless under constant pressure to control and manage cloud costs. The idea that you only pay for what you use in the cloud is conflicting because what you actually pay for is what you provision. As a result, GCP costs continue to mount if you provision assets with more capacity than needed or fail to terminate assets and their components after you are done using them.
Enterprises are also unaware of additional costs related to deploying assets on GCP, or costs arising due to the deployment of assets that do not prove expensive when individually run but collectively continue to increase costs significantly.
This post will help you understand the basics of Google Cloud pricing while also briefing you on simple best practices to save Google Cloud bills.
Google Cloud pricing basics – The Google Cloud Platform gives pricing primarily based on 4 principles:
- No upfront payment— Customers are by no means required to make any upfront payment to use GCP services.
- Pay as you go— Users can scale up and down resiliently across compute, storage, and data transfer, as Google charges for only those resources that are actually utilized.
- No termination fees— In case of scale down or stoppage of services, customers can opt for the same without incurring any extra cost.
- Free tier— Google offers a 12-month Free Trial with $300 of credit for all its cloud services. There is likewise an “Always Free Tier” which provides all major GCP offerings for free, with usage limits.
Google’s pricing features to lower cloud costs include:
- Sustained-usage discounts —For workloads running on GCP services for a majority of the billing month, Google offers discounts of up to 30%.
- Discounts on committed usage— Allows users to use a specific instance for a predetermined amount of time without having to pay upfront and with the freedom to switch instances at any time during the committed timeframe, leading to a 57% savings.
- Preemptible VMs— Google offers discounts of up to 79 % for virtual machines that can be shut down at any time and replaced by different ones. This is similar to AWS spot instances.
- Billing per second — In contrast to other cloud providers, Google bills all services on a per-second basis, which can result in significant savings when instances are constantly started and stopped.
- ColdLine Storage — Google’s cloud storage provides a NearLine and ColdLine storage tier for archived data which are significantly less expensive than traditional storage, and also provide quick access.
- Custom machine types — GCP is the only significant cloud provider that allows users to build their machine configurations. If you require a machine with more powerful capabilities but the high-end instances offered by other providers are not a perfect fit, this can result in additional savings.
Best practices to reduce Google Cloud costs
Here are some simple best practices to get you started on cloud cost savings –
1. Remove block storage discs that aren’t attached
In Google Compute Engine, a block storage disc is typically attached when a virtual machine (VM) is launched. The disc can keep running even when it isn’t connected to anything after the VM is shut down. Block storage discs that are not attached must be located and shut down immediately.
2. Delete outdated snapshots
Snapshots are a prime example of an asset that, while individually affordable, has the potential to increase GCP costs if left unchecked. Identifying and deleting outdated snapshots that are no longer usable is an ideal way of reducing cloud expenditure.
3. Remove unassigned IP addresses
Virtual machines (VMs) are given IP addresses so they can connect to the Internet and communicate with other resources. When you reserve a static external IP address, Google refrains from charging for it until its usage but as soon as you stop, applicable charges are levied. Therefore, it is best to detect and terminate them.
4. Choosing the right instance storage
Choosing the amount of local storage for your virtual machines on the Google Compute Engine can be tricky. Even if your apps utilize only 5GB of the 50GB storage you choose, you will still be charged for that entire drive. Create your applications in such a way that they can move unnecessary data.
5. Termination of zombie assets
Parts of infrastructure running in your cloud environment but not being used for any specific intent are referred to as zombie assets. Typically, they are components of a virtual machine (VM) that failed to load, which needs to be relocated and ended. Zombie assets can also include idle load balancers or SQL databases.
6. Move cold data to low-cost storage
Depending on how frequently and quickly you would like to access data, Google Cloud Platform offers multiple tiers of storage options. (for example, if it was required for data recovery). To cut down GCP expenses, a lot of rarely accessed data can be moved to less expensive storage.
Increasing maximum cost benefits of the above best practices is a continuous process. However, it is not practically feasible to monitor your cloud environment 24/7 while also ensuring that every opportunity to reduce GCP costs is at hand. To overcome this constraint, it is necessary to leverage multi-cloud governance platforms like CloudEnsure that help automate cloud health monitoring via its well architected audits and configurable governance policies applicable to costs, performance and security of cloud environments. Additionally, a dedicated cloud FinOps team can be put together that can utilize the insights and recommendations module to align and meet financial objectives, gain cost insights and optimize spends to drive a cost-effective cloud ecosystem.