Wednesday, May 22, 2013

AWS Cost Saving Tip 10: Make right choice between PIOPS vs Std EBS volumes for saving costs


Tip 1: When using EBS PIOPS Volumes saves cost ?
Since OLTP databases are generally IO intensive with random read/write pattern and demand consistent IOPS they are better suited for EBS PIOPS volumes than Standard EBS volumes. At an instant look of the PIOPS pricing table, it may sound expensive compared to Standard EBS volumes, but when you are applying it in right use cases actually you can save better costs than standard EBS volumes.
Let us explore some scenarios on how PIOPS saves cost than Standard EBS Volumes:
Imagine you are running a Database on Amazon EC2 instance with following requirements.
Scenario 1:
Load: Medium load -Read/Write
Type : OLTP
DB : MySQL
IOPS: 1,000
Volume Size : 500 GB
EC2 instance : m1.xlarge
EBS Optimized - Yes


EBS Type
Volume Size
IOPS
IOPS Cost
Volume Price
Overall (USD)
PIOPS
500
1000
100
62.5
~162.5
Standard
500
Best effort
259
50
~309
PIOPS = 500 X0.125 + 1000 X 0.1 = ~162.5
Standard = 500 X 0.1 + (86400 X 30 X 1000 /1000000) X 0.1 = ~309 
Standard volumes are assembled in EBS Striping (RAID 0) to get 1000 IOPS in Best effort basis
Savings : You can achieve ~47% cost savings if EBS PIOPS can be used instead of Standard EBS Volumes for OLTP scenario for medium loads


Scenario 2:
Load: Heavy load -Read/Write
Type : OLTP
DB : MySQL
IOPS: 10,000
Volume Size : 1 TB 
EC2 instance : m2.4xlarge
EBS Optimized - Yes


EBS Type
Volume Size
IOPS
IOPS Cost
Volume Price
Overall
PIOPS
1 TB
10000
1000
125
~1125
Standard
10 TB
Best effort
2592
1000
~3592
PIOPS = 1 TB X0.125 + 10000 X 0.1 = ~1125
Standard = (10 X 1TB) X 0.1 + (86400 X 30 X 10000 /1000000) X 0.1 = ~3592
Standard volumes are assembled in EBS Striping (RAID 0 = 1 TB X 10) to get 10000 IOPS in Best effort basis ( not guaranteed)
Savings : You can achieve ~68% cost savings if EBS PIOPS can be used instead of Standard EBS Volumes for OLTP scenario for Heavy loads 

It is clear from the above analysis that if you have OTLP workloads with consistent IOPS requirements then depending upon the Volume Size and number of IOPS required, your savings also proportionately increases if you choose PIOPS volumes over Standard volumes.


Tip 2: When using EBS standard Volumes saves cost ?
When you are designing an online application, it is common that not all the tiers demand consistent IOPS. Example: Your web and application layers usually do not demand consistent IOPS.  Unless you are locally writing lots of data files in web/app EC2 (which is not a advisable practice) you do not need PIOPS volumes for these tiers. For such tiers standard EBS volumes are recommended. Standard volumes are well suited for use as boot volumes for web/app tiers, where the burst I/O capability provides fast instance start-up times (+1 when used in autoscaling). In addition std volumes are better performers for sequential operations. ex: Workloads like OLAP databases, Reporting stores etc which are more sequential, bursty and follows batch-oriented pattern are a better fit for standard volumes.
Let us explore some scenarios on where to use standard volumes and avoid PIOPS overuse and save costs.
Scenario 3:
Load: Low IOPS, boot volumes , bursty workloads
Tier : Web/App 
IOPS: 30-100
Volume Size : 30 GB
EC2 instance : m1.large
EBS Optimized - No


EBS Type
Volume Size
IOPS
IOPS Cost
Volume Price
Overall
PIOPS
30 GB
100
10
3.75
~13.75
Standard
30 GB
30-100
7.7
3
~10.7
PIOPS = 30 GB X0.125 + 100 X 0.1 = ~13.75
Standard = 30 GB X 0.1 + (86400 X 30 X 30 /1000000) X 0.1 = ~10.7
Imagine you 10+ EC2 serving your Web/App Tier then multiply this cost :
13.75 X 10 = ~137.5 USD
10.7 X 10 = ~ 107 USD
Savings : You can achieve ~22% cost savings if EBS volumes can be used instead of PIOPS Volumes for boot/sequential scenarios. 

It is evident that from the above analysis that wisely choosing right EBS volume type saves money. All layers of the application stack will not demand heavy and consistent IO in a larger web scale application; Secondly EBS PIOPS is costlier than standard EBS volumes. Taking both the points into consideration, I usually recommended to mix-match your tiers with standard EBS/PIOPS volumes and other storage options to get better overall cost efficiency and performance in Amazon Cloud.


Other Tips

Cost Saving Tip 1: Amazon SQS Long Polling and Batch requests
Cost Saving Tip 2: How right search technology choice saves cost in AWS ?
Cost Saving Tip 3: Using Amazon CloudFront Price Class to minimize costs
Cost Saving Tip 4 : Right Sizing Amazon ElastiCache Cluster
Cost Saving Tip 5: How Amazon Auto Scaling can save costs ?
Cost Saving Tip 6: Amazon Auto Scaling Termination policy and savings
Cost Saving Tip 7: Use Amazon S3 Object Expiration
Cost Saving Tip 8: Use Amazon S3 Reduced Redundancy Storage  (new)
Cost Saving Tip 9: Have efficient EBS Snapshots Retention strategy in place (new)
Cost Saving Top 10: Make right choice between PIOPS vs Std EBS volumes and save costs (new)

No comments:

Need Consulting help ?

Name

Email *

Message *

DISCLAIMER
All posts, comments, views expressed in this blog are my own and does not represent the positions or views of my past, present or future employers. The intention of this blog is to share my experience and views. Content is subject to change without any notice. While I would do my best to quote the original author or copyright owners wherever I reference them, if you find any of the content / images violating copyright, please let me know and I will act upon it immediately. Lastly, I encourage you to share the content of this blog in general with other online communities for non-commercial and educational purposes.

Followers