| « PreviousNext » | |
![]() ![]() ![]() | Did this page help you? Yes | No | Tell us about it... |
Topics
If you need consistent performance and your database workloads generate a lot of random I/O, you can improve the performance of your DB instance by using Amazon RDS Provisioned IOPS (input/output operations per second) storage. Provisioned IOPS storage is a storage option that delivers fast, predictable, and consistent throughput performance. When you create a DB instance, you specify an IOPS rate and storage space allocation. Amazon RDS provisions that IOPS rate and storage for the lifetime of the DB instance or until you change it. Provisioned IOPS storage is optimized for I/O intensive, online transaction processing (OLTP) workloads that have stringent performance requirements.
Note
You cannot decrease standard storage or Provisioned IOPS storage allocated for a DB instance.
You can create a DB instance that uses Provisioned IOPS storage by using the AWS Management Console, the Amazon RDS API, or the Command Line Interface (CLI). You specify the IOPS rate and the amount of storage that you require. You can provision a MySQL or Oracle DB instance with up to 30,000 IOPS and 3 TB of allocated storage. You can provision a SQL Server DB instance with up to 10,000 IOPS and 1 TB of allocated storage.
Note
Your actual realized IOPS may vary from the value that you specify depending on your database workload, DB instance size, and the page size and channel bandwidth that are available for your DB engine. For more information, see Factors That Affect Realized IOPS Rates.
The ratio of the requested IOPS rate to the amount of storage allocated is important. The ratio of IOPS to storage, in GB, for your DB instances should be between 3:1 and 10:1 for MySQL and Oracle DB instances. For SQL Server DB instances, the ratio should be 10:1. For example, you could start by provisioning an Oracle DB instance with 1000 IOPS and 200 GB storage (a ratio of 5:1). You could then scale up to 2000 IOPS with 200 GB of storage (a ratio of 10:1), 3000 IOPS with 300 GB of storage, and up to the maximum for an Oracle DB instance of 30,000 IOPS with 3 TB (3000 GB) of storage.
The following table shows the IOPS and storage range for each database engine.
| Range of Provisioned IOPS | Range of Storage | Range of IOPS to Storage (GB) Ratio | |
|---|---|---|---|
| MySQL | 1000 - 30,000 IOPS | 100 GB - 3 TB | 3:1 - 10:1 |
| Oracle | 1000 - 30,000 IOPS | 100 GB - 3 TB | 3:1 - 10:1 |
| SQL Server Express and Web | 1000 - 10,000 IOPS | 100 GB - 1 TB | 10:1 |
| SQL Server Standard and Enterprise | 2000 - 10,000 IOPS | 200 GB - 1 TB | 10:1 |
You can modify an existing Oracle or MySQL DB instance to use Provisioned IOPS storage, and you can modify Provisioned IOPS storage settings.
Your actual realized IOPS rate may vary from the amount that you provision depending on page size and network bandwidth, which are determined in part by your DB engine. It is also affected by DB instance size and database workload.
The theoretical maximum IOPS rate is also a function of database I/O page size and available channel bandwidth. MySQL uses a page size of 16 KB, while Oracle and SQL Server use 8 KB. On a DB instance with a full duplex I/O channel bandwidth of 1000 megabits per second (Mbps), the maximum IOPS for page I/O is about 6,250 IOPS in each direction for 16 KB I/O and 12,500 IOPS in each direction for 8 KB I/O. A workload consisting of 50% reads and 50% writes could reach 12,500 IOPS with 16 KB I/O or 25,000 IOPS with 8 KB I/O.
If traffic on one of the channels reaches capacity, available IOPS on the other channel cannot be reallocated. As a result, the attainable IOPS rate will be less than the provisioned IOPS rate.
Each page read or write constitutes one I/O operation. Database operations that read or write more than a single page will use multiple I/O operations for each database operation. IO requests larger than 16 KB are treated as more than one IO for the purposes of PIOPS capacity consumption. A 20 KB IO request will consume 1.25 IOs, a 24 KB request will consume 1.5 IOs, a 32 KB request will consume 2 IOs, and so on. The IO request is not split into separate IOs; all IO requests are presented to the storage device unchanged. For example, if the database submits a 128 KB IO request, it goes to the storage device as a single 128 KB IO request, but it will consume the same amount of PIOPS capacity as eight 16 KB IO requests.
The following table shows the page size and the theoretical maximum IOPS rate for each DB engine. IOPS rates are based on the m2.4xlarge instance class with full duplex and a workload that is perfectly balanced between reads and writes.
| DB Engine | Page Size | Maximum IOPS Rate |
|---|---|---|
| MySQL | 16 KB | 12,500 |
| Oracle | 8 KB | 25,000 |
| SQL Server | 8 KB | 10,000 |
Note
If you provision an IOPS rate that is higher than the maximum or that is higher than your realized IOPS rate, you may still benefit from reduced latency and improvements in overall throughput.
If you are using Provisioned IOPS storage, we recommend that you use the m1.large, m1.xlarge, m2.2xlarge, and m2.4xlarge instance classes. These instance types are optimized for Provisioned IOPS storage; other instance types are not. In addition, the available network bandwidth for Provisioned IOPS for m1.large instance class is 500 megabits per second (Mbps) compared to 1000 Mbps for an m1.xlarge, m2.2xlarge, or m2.4xlarge instance. As a result, for a similar IOPS-intensive workload, the number of realized IOPS for m1.xlarge, m2.2xlarge, and m2.4xlarge will be higher than that of m1.large.
System activities such as automated backups, DB snapshots, and scale storage operations may consume some I/O, which will reduce the overall capacity available for normal database operations. If your database design results in concurrency issues, locking, or other forms of database contention, you may not be able to directly use all the bandwidth that you provision.
If you provision IOPS capacity to meet your peak workload demand, during the non-peak periods, your application will probably consume fewer IOPS on average than provisioned.
To help you verify that you are making the best use of your Provisioned IOPS storage, we have added a new CloudWatch Metric called Disk Queue Depth. If your application is maintaining an average queue depth of approximately 5 outstanding I/O operations per 1000 IOPS that you provision, you can assume that you are consuming the capacity that you provisioned. For example, if you provisioned 10,000 IOPS, you should have a minimum of 50 outstanding I/O operations in order to use the capacity you provisioned.
For production OLTP use cases, we recommend that you use Multi-AZ deployments for enhanced fault tolerance and Provisioned IOPS storage for fast and predictable performance. In addition to Multi-AZ deployments, Provisioned IOPS storage complements the following features:
Amazon VPC for network isolation and enhanced security.
Read Replicas – The type of storage on a read replica is independent of that on the master DB instance. For example, if the master DB instance uses standard storage, you can add read replicas that use Provisioned IOPS storage and vice versa. If you use standard storage–based read replicas with a master DB instance that uses Provisioned IOPS storage, the performance of your read replicas may differ considerably from that of a configuration in which both the master DB instance and the read replicas are using Provisioned IOPS storage.
DB Snapshots – If you are using a DB instance that uses Provisioned IOPS storage, you can use a DB snapshot to restore an identically configured DB instance, regardless of whether the target DB instance uses standard storage or Provisioned IOPS storage. If your DB instance uses standard storage, you can use a DB snapshot to restore only a DB instance that uses standard storage.
You can use Provisioned IOPS storage with any DB instance class that runs the DB engine you want; however, smaller DB instance classes will not consistently make the best use Provisioned IOPS storage. We recommend using the db.m1.large, db.m1.xlarge, m2.2xlarge, or m2.4xlarge DB instance classes, which are optimized for Provisioned IOPS storage.
Because Provisioned IOPS storage reserves resources for your use, you are charged for the resources whether or not you use them in a given month. When you use Provisioned IOPS storage, you are not charged the monthly Amazon RDS I/O charge. If you prefer to pay only for I/O that you consume, a DB instance that uses standard storage may be a better choice. For Amazon RDS pricing information, see the Amazon RDS product page.
The Command Line Interface (CLI) supports Provisioned IOPS storage in the following commands:
rds-create-db-snapshot – The output shows the IOPS value.
rds-create-db-instance – Includes the
input parameter iops, and the output shows the IOPS
rate.
rds-modify-db-instance – Includes the
input parameter iops, and the output shows the IOPS
rate.
rds-restore-db-instance-from-db-snapshot –
Includes the input parameter iops, and the output
shows current IOPS rate. If Apply Immediately was
specified, the output also shows the pending IOPS rate.
rds-restore-db-instance-to-point-in-time –
Includes the input parameter iops, and the output
shows the IOPS rate.
rds-create-db-instance-read-replica –
Includes the input parameter iops, and the output
shows the IOPS rate.
The Amazon RDS API supports Provisioned IOPS storage in the following actions:
CreateDBInstance – Includes the input
parameter iops, and the output shows the IOPS
rate.
CreateDBInstanceReadReplica – Includes
the input parameter iops, and the output shows the
IOPS rate.
CreateDBSnapshot – The output shows the
IOPS rate.
ModifyDBInstance – Includes the input
parameter iops, and the output shows the IOPS
rate.
RestoreDBInstanceFromDBSnapshot –
Includes the input parameter iops, and the output
shows current IOPS rate. If Apply Immediately was
specified, the output also shows the pending IOPS rate.
RestoreDBInstanceToPointInTime – Includes
the input parameter iops, and the output shows the
IOPS rate.