In
cloud infrastructure, We have lot of machines present other than production servers.
This includes machines used for development and testing purposes. Some of them also used
for temporary purposes like doing demos to client, doing R&D on cloud infrastructure, etc. There are some machines present which are used for implementing continuous integration and deployment pipelines(Jenkins or Travis server).
These
machines does not requires high end configurations, auto-scaling
or load balancing features. Also we can compromise its CPU and disk performance as long as it doesn't affects functionalities.
Major part of cloud bill consists of VM cost. Though Azure charge you for their service on minute by minute basis. To save more money, Azure
provides a basic service tier for general purpose VMs(A0-A4).
They are similar to standard service tier with having some differences.
Difference between Basic and Standard service tiers VM
Features
|
Standard
Tier VM
|
Basic
Tier VM
|
Available
for
|
All
sizes of VM
|
Only
for A0-A4 instances
|
Auto
scaling
|
Present
|
Absent
|
Load
Balancing
|
Present
|
Absent
|
Disk
IOPS
|
Almost
double than basic tier
|
Half
than standard tier
|
CPU
Performance
|
Better
CPU performance
|
Less
CPU performance than standard tier
|
Cost
|
-
|
20-25%
cheaper than standard tier
|
As I said earlier, There are machines present in cloud infrastructure which do not requires auto-scaling and load-balancing features for their use. These can also works with low disk IOPS and CPU performance. For these kind of machines choosing basic service tier for Azure VMs saves money, which you can spend it for doing R&D of another Azure services.
There are several ways to create create machines with basic service tier. You can use Azure portal or powershell. If you are using powershell New-AzureQuickVM cmdlet then just prefix "Basic_" to virtual machine instance size (e.g. to create A1 machine use "Basic_A1" for InstanceSize parameter).
Illustration:
A1 Standard (1 core, 1.75 GB) Linux machine
Per day Cost = 24 hrs. * Rate
= 24 * 0.06
= 1.44 $
Monthly Cost = 1.44 * 30
= 43.2 $
A1 Basic (1 core, 1.75 GB) Linux Machine
Per day Cost = 24 hrs. * Rate
= 24 * 0.044
= 1.056 $
Monthly Cost = 1.056 * 30
= 31.68 $
Changing instance type from standard to basic saves up to 25% of VM bill.
There are many ways to reduce the cloud cost like,
- Identifying the unused VMs and shut them down.
- Add scheduler to start/stop non production VMs during office hours.
- Choose instance type of VM carefully.
Do give importance to such small things in cloud, because every PENNY counts right??