Mysql – AWS iops vs disk iops

awscloudMySQL

Recently devops guy from our company told me that our local mysql stage environment are much faster than aws, because local disk has 10k iops, but our aws rds has only 500 iops.

As far as I understand aws iops states for throughout capacity, not the disk speed. And still ssd disk io same 10k iops or more? And considering that the load is less than 500 iops, rds might be much faster?

Best Answer

AWS limits the IOP size to a maximum of 16KB, so whatever IOPS you buy, you will get throughput capped at 16KB times that number. So if you buy 1,000 IOPS on EBS, this will max out at 16MB/s.

If your application does random I/O using smaller blocks that aren't adjacent, e.g. 8KB, you will get maximum throughout of 8MB/s from the same EBS volume.

Historically, IOPS on spinning disks were limited by the rotational speed of the disk. In a 7200rpm disk, the correct sector comes around only 120 times per second.

A real NVMe SSD can handle much faster throughout at lower latencies than AWS EBS.

AWS is slow and expensive - learn to live with it. That is the price you pay for the convenience of not having to host and maintain your own hardware. How much slower cloud and VMs are than bare metal? This will depend to some extent on the nature of your workload, but in general, for equal spec, VMs are often much slower than bare metal.