Amazon RDS - DB Storages

The RDS instances use Amazon Block Storage (EBS) volumes for storing data and log. These storage types can dynamically increase their size as and when needed. But based on the database workloads and price associated with these storage types we can customize the storage need. Following are the factors to be analysed while deciding on the storage types.

  • IOPS – It represents the number of Input Output operations performed per second. Both read and write operations are summed up for finding the IOPS value. AWS creates a report of IOPS value for every 1 minute. It can have value from 0 to tens of thousands per second.

  • Latency – It is the number of milliseconds elapsed between the initiation of an I/O request and the completion of the I/O request. A bigger latency indicates a slower performance.

  • Throughput – The number of bytes transferred to and from the disk every second. AWS reports the read and write throughput separately for every 1-minute interval.

  • Queue Depth – It is the number of I/O requests waiting in the queue before they can reach the disk. AWS reports the queue depth for every 1-minute interval. Also a higher queue-depth indicates a slower storage performance.

Based on the above considerations, the aws storage types are as below.

General Purpose SSD

This is a cost-effective storage that is useful in most of the common database tasks. It can provide 3000 IOPS for a 1- TiB volume. In a 3.34 TiB size the performance can go up to 10000 IOPS.

I/O Credits

Each GB of storage allows 3 IOPs as a base line performance. Which mean a 100 GB volume can provide 300 IOPs. But there may be scenario when you need more IOPS. In such scenario you need to use some IO credit balance which is offered when the storage is initialized. It is 5.4 million IO credits which can be used when a burstable performance need arises. On the other hand when you use less IOPS than the baseline performance, you accumulate the credits which can be used in future requirement of burstable performances.

Below is a equation which shows the relation between burst duration and Credit balance.

Burst Duration = (credit Balance) / [(burst IOPS) – 3(Storage size in GB)]

If your DB needs frequent and long duration burstable performance, then the next storage type will be a better choice.

Provisioned IOPS Storage

This is a type of storage system that gives sustained higher performance and consistently low latency which is most suitable for OLTP workloads.

When creating the DB instance, you specify the required IOPS rate and volume size for such storage. Below is a chart which is used for reference for deciding about the IOPS and storage needed under provisioned storage.

DB Engine Provisioned IOPS Range Storage Range
MariaDB 1000 to 40000 100 GB to 16 TB
SQL Server 1000 to 32000 20GB to 16 TB
MySQL / Oracle/ PostgreSQL 1000 to 40000 100GB to 16 TB

This is a very old storage technology which is maintained by aws, only for backward compatibility. Its features are very limited which are the following.

  • Does not support Elastic Volumes

  • Limited to maximum size of 4 TB

  • Limited to maximum of 1000 IOPS