Mysql – Is MySQL/MariaDB getting a better IOPS deal than Postgres in RDS

amazon-rdsawsMySQLperformancepostgresql

According to the documentation:
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Storage.html

The page size of Mysql is twice bigger than the postgresql one:

MySQL/Maria, 16 KB Pages, 30,000 max IOPS

PostgreSQL, 8 KB Pages, 30,000 max IOPS

This is a problem because the max data block considered a single IOPS is 32kb in RDS. so if you are asking for 30,000 pages pf MySQL data you may reach a 480Mb/s throughput vs 240Mb/s in Postgres for exactly the same amount of money.

Is this really how RDS works? is MySQL twice as good in disk access cost according to the AWS pricing?

Best Answer

As I read that page, "Provisioned IOPS works with an I/O request size of 32 KB. An I/O request smaller than 32 KB is handled as one I/O; for example, 1000 16 KB I/O requests are treated the same as 1000 32 KB requests.", your conclusion is correct.

MySQL has an additional advantage: innodb_flush_neighbors. If on, it will try to combine adjacent blocks together, thereby cutting down the number of IOPs. (This is designed to cut down on head seeks on hard drives, but counterproductive on SSDs since there is no seek time.)

(I don't know if Postgres has a similar thing.)