5 Tips for Maximum AWS EBS Performance
Image source: Pixabay
It seems like everyone is turning to Amazon Web Services (AWS), for everything from simple storage to application development and hosting. The variety of services offered and the infrastructure resources AWS can provide make it an obvious choice for many.
Despite this, AWS can be quite convoluted to understand and configure and costs can quickly get out of control in the quest for better performance. To help you better understand one of your options, EBS, and how to get the most from it, read on.
Why Care About EBS?
If you are using Elastic Cloud Compute (EC2) instances then Elastic Block Store (EBS) is your goto choice for persistent storage both during instance use and after they have been terminated. EBS is flexible and scalable and was designed for mission-critical systems and applications.
It can handle containerized applications, big data analytics, media workflows, databasing, and file systems, and is good for use with applications that require granular updates or access to unformatted, block-level storage. Multiple EBS volumes can be attached to each EC2 instance, allowing for easier access distribution.
5 Tips for Max Performance
Once you've decided that EBS is the storage solution you need, it's time to make sure you're getting the most out of your investment. The following tips will help get you started.
1. Choose the Right Volume Type
The type of volume you choose to attach will determine both your performance capabilities and your pricing. EBS offers two volume types: SSD and HDD. SSD is used for high-performance workloads that need high I/O Operations per Second (IOPS) and low latency while HDD is used for workloads that are high-volume and throughput intensive.
In general, EC2 instances will need to use SSD volumes, for which there is a General Purpose option and a Provisioned option. General Purpose volumes are cheaper and will work fine for most applications. Provisioned volumes are better saved for mission-critical applications or those that require high resources, such as large databases, provided that they are running operations at least 256K or more.
If you are running numerous smaller operations, you get better value out of General Purpose volumes as they combine operations into 256K chunks when counting against your allowed amounts while Provisioned volumes count each operation under this amount as using a full IOPS credit.
2. Easily Create Fresh Volumes
There are a variety of features in AWS EBS but one of the more useful is snapshots, whose primary purpose is to serve as a backup for failed or corrupted volumes. These snapshots can also be used to create duplicate volumes for use as test environments or as Redundant Array of Independent Disks (RAID) configurations.
The ability to create volumes from snapshots means that you can quickly spin up environments for AB testing, can safely perform penetration testing or incident response on production mirrors, and can easily test the compatibility of tools or applications with minimal effort dedicated to creating an environment.
Easy volume creation from snapshots allows you to quickly set up RAID for better distribution of workload or data redundancy, depending on your configuration. This can provide an extra performance boost to applications that are restricted by volume type or provide extra security for vital applications and databases.
3. Learn From Your Metrics
AWS automatically collects metrics and status information on your volumes through CloudWatch, which you can access by API, CLI, or through the console. Monitoring these metrics can help you diagnose performance issues and provide insight into how and in what ways your volumes are being used.
Using a combination of disk I/O, disk activity, and latency metrics, you can determine if your volumes are correctly sized, what benefit you might get from a caching layer or load balancer, whether the type of volumes you’re using is correct, and more. Built-in alerts, based on these metrics, can tell you if volumes become disabled or drop below a given performance level, allowing you to quickly respond to changes and ensure that your applications and services remain available.
4. Manage Your Volumes
AWS volumes can quickly get out of hand if not managed properly, either because they are unknowingly deleted or orphaned and unutilized. To help control this, and make sure that you’re neither losing data nor paying for storage you're not benefitting from, EC2 instances have a built-in DeleteOnTermination value. This value allows you to specify what happens to the attached EBS volumes when an instance is deleted or otherwise terminated. It can be set either during AMI creation or during launch and defaults to True for root volumes and False for non-root volumes.
Automatically controlling what happens to volumes on instance termination allows you to ensure that a volume will remain and can be backed up or attached to another instance upon termination or grants you the option to securely delete persistent data upon termination.
5. Take Advantage of Burst Credits
If you have applications or services that see significant fluctuations in activity, burst credits can be vital to get consistent performance. Burst credits, used to boost performance during periods of high activity, are given automatically when a volume is created. Each new volume has enough credits to sustain an increase of 3,000 IOPS for 30 minutes, after which your performance will drop back to baseline. These credits will slowly regenerate over time but there is no way to purchase more or increase your limit other than through volume size.
If you have instances that are suddenly crawling or services that are no longer responding for no clear reason, check your burst credits. If they are what’s stopping your productivity, attaching a mirror volume can help distribute IOPS and provide an additional burst credit pool. Another option is to simply increase your volume size to 1TiB or larger, as such volumes will always get maximum performance and aren’t affected by credits.
Conclusion
The AWS ecosystem can be frustrating to navigate, particularly when you aren’t sure of your options or are still learning to manage them. To understand the full benefits and drawbacks of using EBS, you’ll need to dig through AWS documentation but this is easier once you have a general idea of what to look for.
Hopefully, after reading this article, it’s a little clearer why you might use EBS, how you can get it to deliver the performance you need, and what sort of features are worth exploring more deeply.