I'm trying to find out which MySQL status variables can be used to get as close as possible to the RDS value of "Queue depth".

On a test system, I reckon that %pending% variables may be at least a part of it:

mysql> show global status like '%pending%';
| Variable_name                | Value                |
| Innodb_data_pending_fsyncs   | 18446744073709551615 |
| Innodb_data_pending_reads    | 0                    |
| Innodb_data_pending_writes   | 0                    |
| Innodb_os_log_pending_fsyncs | 0                    |
| Innodb_os_log_pending_writes | 0                    |

although in this case, Innodb_data_pending_fsyncs is clearly a bogus value.

Assuming I'm on an InnoDB-only setup, which are the values that I can use for this purpose?

  • 2
    It can't have an equivalent because I/O queue depth is a metric of the storage device (or its driver), not the database engine. – mustaccio Oct 21 at 15:35
  • 18446744073709551615 is probably the 64-bit unsigned value equivalent to -1. Still a bogus value. – Rick James Oct 21 at 23:06
  • The "pending" values are transient. What do you hope to gain from them? That is, tell us what Queue depth means, and why you care about it. – Rick James Oct 21 at 23:13
  • I was hoping to get some MySQL metric that indicates excess (pending) I/O; I'm aware of using Threads_running as a very generic metric, but I was looking for something more storage-related. – Marcus Oct 22 at 6:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.