MySQL – Managing High Write IOPS on Amazon RDS

amazon-rdsawsinnodb

I posted this first in the aws forums before i learned that there's a stackoverflow for DBs but i would ask this here as well.

We recently took over management of a wordpress site using a MySQL DB instance. a few days ago, it ran out of space which we found unusual because the site itself isn't a super busy site and it doesn't really have a lot of stuff in it when checked through wp-admin. To get the site to load, we increased the allocated storage from 185GB to 250GB. We then deleted the transients then optimized the tables and we got almost all the 250GB back. We then observed the monitoring windows in aws and we noticed that the free space was going down even if the site isn't that active at that time (loses around 2.5 GB every 24 hours). There are no running cron jobs since cron is disabled and checking show processlist isn't showing any running queries which we found strange.

We then realized that the write iops was pretty high at around 150-200 as reported through aws rds monitoring and is not going down considering that there's very little activity on the site. This was probably what caused the space to fill up before.

Going through some of the suggested links for this issue here in dba.stackexchange, i found this link which suggested to run the command SHOW ENGINE INNODB STATUS and i found this

--------------
ROW OPERATIONS
--------------
0 queries inside InnoDB, 0 queries in queue
0 read views open inside InnoDB
Process ID=3876, Main thread ID=47504970233600 , state=sleeping
Number of rows inserted 1695335, updated 24452885, deleted 684983, read 11973811927
0.00 inserts/s, 2.39 updates/s, 0.00 deletes/s, 586.80 reads/s

Which doesn't seem to be a great number of updates. We're not sure where to check next exactly. If it would help, the instance is a t3.large instance

Thanks

Best Answer

I learned how to enable general logging on the db and i found a possible issue with the wordpress theme being used. We will be replacing this soon anyway so hopefully there won't be any issues moving forward

Related Question