Mysql – Determining which database instance makes biggest IO

loadMySQLpostgresql

Assuming that I have a dedicated server on which I am running multiple instances of mysql and postresql servers. How without iotop determine which instance in particular time (proc/pid/io shows data collected in some peroid of time) makes the biggest IO (so it increases IOWAIT)?

When lots of ppl do something on DB then I clearly see which instance is making the load because of high cpu usage, but I had a situation when the cpu usage was just normal, but very high iowait made a huge load on server and i had problem finding process that was making some outstanding IO

Best Answer

I would suggest you to take a look at atop. When you run it interactively you can select 'i' then press 1 , after that you can select 'd'.

Atop will colour the resources thrashed and 'd' will show only processes hitting disks.