AWS Certified SysOps Administrator - Associate

Domain 6 Cost and Performance Optimization

Modifying EBS Configurations to Enhance Performance

Welcome to this comprehensive guide on modifying Amazon EBS configurations to boost performance. In this article, we explore various EBS volume types, recommended configuration adjustments, and best practices to optimize your storage and associated workloads.

Understanding EBS Volume Types

When optimizing EBS performance, it is essential to consider both the volumes and the EC2 instances they attach to. Choosing the right volume type from the beginning can make a significant difference in performance and cost efficiency.

SSD vs. HDD Storage

EBS volumes are generally split into two categories:

  • SSD-based Volumes: Ideal for most workloads.
  • HDD-based Volumes: Generally reserved for archival data or environments that require sequential reads and writes with large chunk sizes.

For many applications, GP2 and GP3 are the standard choices. GP3 volumes typically deliver better performance and improved I/O at a lower cost compared to GP2. They are well-suited for medium workloads such as medium-sized databases, web servers, application servers, and boot volumes.

The image is a diagram comparing EBS volume types, suggesting switching from gp2 to gp3 for better performance and lower cost.

Provisioned IOPS Volumes

For applications that require high I/O performance—such as intensive databases or applications with high throughput and low latency demands—the Provisioned IOPS volumes (io1 and io2) are designed to meet those needs. These volumes can achieve up to 64,000 IOPS, with the rare I/O Express option offering up to 256,000 IOPS, albeit at a higher cost.

The image provides information on choosing the right EBS volume type, specifically Provisioned IOPS SSD (io1/io2), highlighting its suitability for I/O-intensive workloads, higher IOPS provisioning, and use cases like databases and big data.

HDD Options

For workloads requiring lower cost and high throughput in sequential operations, AWS provides two HDD options:

  • ST1 (Throughput Optimized HDD): Best suited for large, sequential workloads.
  • SC1 (Cold HDD): Ideal for archival purposes with infrequent data access.

The image compares Throughput Optimized HDD (st1) and Cold HDD (sc1), highlighting st1's suitability for large, sequential workloads and sc1's cost-effectiveness for infrequent access and large-volume data.

Quick Summary for Exam Purposes

  • GP2/GP3: Standard choices for web servers, application servers, and boot volumes.
  • Provisioned IOPS (io1/io2): Ideal for high-performance databases and throughput-intensive applications.
  • Throughput-Optimized HDD (st1): Best for data warehousing.
  • Cold HDD (sc1): Suited for backups and archival storage.

EBS-Optimized EC2 Instances

Most modern EC2 instances are EBS-optimized, meaning they have a dedicated network channel for EBS traffic that significantly improves throughput and overall performance. In fact, nearly 80% of instances come with this feature by default.

The image lists types of EBS-optimized instances, detailing their performance guarantees for SSDs and HDDs in terms of IOPS and throughput. It includes General Purpose SSD, Provisioned IOPS SSD, and Throughput Optimized HDD.

Normally, adding extra network interfaces to an EC2 instance does not increase throughput. However, an EBS-optimized instance utilizes a dedicated channel that may provide up to 40 Gbps on the backplane, leading to impressive performance gains.

Enhancing Performance via Volume Configuration Adjustments

Volume Size Adjustments and Snapshot Pre-Warming

Modifying the volume size can also enhance performance. For example, increasing the size of a GP2 volume may lead to better performance characteristics. When restoring a volume from a snapshot, initial performance may be slow unless you use pre-warming techniques or enable fast snapshot restore. Fast snapshot restore automatically pre-initializes the volume to ensure optimal performance right from the first use.

The image illustrates the concept of performance penalties when initializing volumes from snapshots, suggesting solutions like pre-warming and enabling fast snapshot restore.

In the past, administrators would use the dd command to read every sector of the disk to pre-warm the volume due to thin provisioning. Now, with fast snapshot restore, AWS handles this pre-initialization automatically, eliminating the initial performance penalty.

Monitoring EBS Performance

Effective monitoring is key to performance management. Utilize Amazon CloudWatch and CloudWatch Logs to track metrics such as bytes read, total reads/writes, and total time on I/O operations. These insights help in fine-tuning your EBS performance.

The image illustrates the concept of tracking performance using Amazon CloudWatch, featuring icons for Amazon CloudWatch and Amazon Elastic Block Store (Amazon EBS).

Leveraging RAID for Maximum I/O

For maximum I/O, consider implementing RAID 0, which stripes data across multiple drives. Note that while RAID 0 improves performance by using multiple channels, it does not offer redundancy. However, because EBS volumes are inherently redundant (AWS maintains three copies of your data), you can benefit from increased performance without compromising data availability.

The image illustrates RAID 0 striping for maximum I/O, showing data blocks distributed across two drives.

Linux Performance Tweaks

On Linux systems, adjusting the read-ahead cache can provide further performance benefits—especially for HDD volumes. For example, setting a read-ahead value of one megabyte per block can enhance performance. The following commands demonstrate how to view and adjust the read-ahead value on a Linux device:

$ sudo blockdev --report /dev/<device>
RO   RA    SSZ   BSZ   StartSec   Size          Device
rw   256   512   4096   4096      8587820544   /dev/<device>
$ sudo blockdev --setra 2048 /dev/<device>

Note

Ensure you are running a modern Linux kernel (version 3.8 or later) to benefit from the latest performance improvements and I/O monitoring capabilities.

The image provides guidance on using a modern Linux kernel, recommending version 3.8 or later for improved I/O performance and monitoring I/O size via CloudWatch metrics.

Conclusion

Understanding and choosing the correct EBS volume configuration is crucial for optimizing performance. Whether you are using GP3 for everyday workloads, Provisioned IOPS for high-performance databases, or HDD options for data warehousing and archival storage, tailoring your setup to your specific use case can greatly enhance your infrastructure's efficiency.

Remember to leverage EBS-optimized instances and features like fast snapshot restore to maintain high performance. For further insights into AWS storage and performance best practices, check out the AWS Documentation.

Thank you for reading this guide. We look forward to bringing you more insights in our next article.

Watch Video

Watch video content

Previous
Monitoring EBS Metrics for Performance and More