- Newest
- Most votes
- Most comments
Hello,
I can understand that you have tested the RDS Optimised IOPS feature on the r6gd.2xlarge instance and are unable to see any changes in your CloudWatch metrics.
Kindly allow me to inform you that RDS Optimised Reads feature achieves faster query performance through the use of an instance store. An instance store is a temporary-level block storage which is located on Non-Volatile Memory Express (NVMe) solid state drives (SSDs). This storage is specifically optimized for low latency, high random I/O performance, and high sequential read throughput.
MySQL workloads that generate temporary objects during query processing can leverage the instance store for faster query execution. Such workloads include queries involving sorts, hash aggregations, high-load joins, Common Table Expressions (CTEs), and queries on unindexed columns. The instance store offers higher IOPS (Input/Output Operations Per Second) and better performance compared to persistent Amazon EBS (Elastic Block Store) storage configurations.
In this scenario, RDS Optimized Reads redirects operations on temporary tables to the instance store, allowing input/output operations on EBS volumes to proceed uninterrupted. By diverting temporary table operations to the instance store, RDS Optimized Reads ensures that query processing can take advantage of the higher performance offered by the instance store without impacting the persistent storage operations on EBS volumes.
If you have workloads that rely heavily on temporary objects, such as internal tables or files, for their query execution, then you can benefit from turning on RDS Optimized Reads.
Below are some use cases: -> Applications that run analytical queries with complex common table expressions (CTEs), derived tables, and grouping operations.
-> Workloads that use internal temporary tables for query processing. You can monitor the engine status variable created_tmp_disk_tables to determine the number of disk-based temporary tables created on your DB instance.
-> Applications that create large temporary tables, either directly or in procedures, to store intermediate results.
-> Database queries that perform grouping or ordering on non-indexed columns.
Kindly note that, you can monitor the MySQL status variable created_tmp_disk_tables to observe the rate of creation for temporary tables.
However, you could use the following best practices for RDS Optimised Reads: -> Utilize the default MIXED setting for the binlog_format parameter. Depending on the transaction size, setting binlog_format to ROW can lead to large binlog cache files on the instance storage.
-> Keep the binlog_error_action parameter at its default ABORT_SERVER value. This avoids binary logging issues on DB instances with enabled backups.
-> Set the internal_tmp_mem_storage_engine parameter to TempTable, and configure the temptable_max_mmap parameter to match the available instance storage size.
-> Avoid performing bulk changes within a single transaction. Such transactions can generate large binlog cache files on the instance storage and cause issues when the storage is full. Instead, consider splitting writes into multiple smaller transactions to minimize storage usage for binlog cache files.
-> If your DB instance or Multi-AZ DB cluster has sufficient memory but still reaches the instance storage limit, increase the binlog_cache_size value to maintain session-specific binlog entries in memory. This configuration prevents writing binlog entries to temporary cache files on disk. The binlog_cache_size parameter is session-specific, and its value can be changed for each new session. However, increasing this parameter's value can increase memory utilization on the DB instance during peak workloads. Therefore, consider adjusting the parameter value based on your application's workload pattern and the available memory on the DB instance.
For detailed information, you can refer to the below documentation: [+] https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-optimized-reads.html [+] https://aws.amazon.com/blogs/aws/new-amazon-rds-optimized-reads-and-optimized-writes/
I would like to inform you that since I do not have access to your resources or environment, I will not be able to validate or confirm the process you have tested. Additionally, the performance benefits of the approach you mentioned may vary depending on the nature of your database workload. If your workload is heavily I/O-bound, involving operations such as sorts, hash aggregations, or other similar operations, you may observe significant performance improvements. However, if your workload does not fall into these categories, the performance benefits may not be as substantial.
However, if you require specific troubleshooting assistance or have any further concerns, I recommend raising a support case by creating a ticket with our support team. Our support team will have access to the necessary resources and information to provide you with more accurate and tailored guidance based on your specific environment and requirements.
answered 2 years ago
I have concluded it must be because it only helps queries that use temp tables, and presumably my workload does not create many, or not large enough ones.
I had been hoping that it worked more like the Postgres version https://aws.amazon.com/blogs/database/new-amazon-aurora-optimized-reads-for-aurora-postgresql-with-up-to-8x-query-latency-improvement-for-i-o-intensive-applications/ ...which "automatically caches database pages about to be evicted from the in-memory database buffer pool" ...this seems like it would automatically benefit any query.
But maybe that's a limitation of MySQL buffer pool implementation more than RDS.
I wish it was possible to cache the whole db on the local NVMe, like provided by 3rd party services such as https://medium.com/tessell-dbaas/high-performance-database-with-nvme-storage-22d6a2d869c2
Relevant content
asked a year ago

I don't know where the info is sourced from but, assuming it's accurate, Google search AI summary gave a much better description of what Optimised Reads actually does than I could find in the AWS docs above:
"Amazon RDS Optimized Reads for MySQL makes the best use of NVMe local storage by moving temporary tables to local NVMe-based SSD storage. This feature can improve query processing speed by up to two times for complex queries that use temporary tables." "Optimized Reads can improve the speed of queries that use temporary tables, such as queries that require sorts, hash aggregations, high-load joins, and Common Table Expressions (CTEs)."
So if it's only used for queries involving temporary tables that could explain why it's so under-utilised.
Quite a disappointing feature, but on plus side I can save money by using a cheaper instance type.