Mysql – Why is MySQL Workbench is reporting different number of writes per second at the same time on the same database

mysql-workbench

I am working on a project with MySQL Workbench on a server that I remote into with Windows remote desktop. Sometimes I will also connect to the server with MySQL Workbench on my local machine.

When I go to server status, the number of InnoDb Writes per Second is different depending on whether I am using MySQL Workbench on the remote server or on my local machine.

Here is a screen shot of what it looks like, the left status is on my local machine, the right is on the remote desktop.

enter image description here

It would be nice to be able see accurate live numbers of writes per second.

Best Answer

Perhaps that figure is a snapshot with a tight granularity, reading the number of writes once then again after some portion of a second, and multiplying up to get a "per second" value. In that case I would expect the figures to differ every time unless you somehow request an update of both at exactly the same fraction of a second.

If the figure is an average taken over a larger timeframe (multiple seconds instead of one or a fraction there-of) then the figures would be closer to each other.

You can see a similar effect looking at CPU use on any unix-a-like system by running two copies of a top variant in separate terminals. The same for disk and network IO with iotop and iftop or equivalents. They will almost always show slightly different figures as they poll for updated data at slightly different times, especially if you turn the update frequency as fast as you can read.