Bug #13284 Memory Stats not working
Submitted: 16 Sep 2005 21:25 Modified: 5 Oct 2005 12:35
Reporter: Doug Hunting Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Administrator Severity:S3 (Non-critical)
Version:1.1.2 OS:Windows (Windows XP Pro SP2)
Assigned to: Vladimir Kolesnikov CPU Architecture:Any

[16 Sep 2005 21:25] Doug Hunting
Description:
The memory health tab in MySQL Admin doesn't work anymore. It worked in previous versions, but there is no activity now in either Cache Hits OR Key efficiency...

How to repeat:
View memory health...
[16 Sep 2005 23:16] Doug Hunting
The variables are not properly updated
[19 Sep 2005 0:23] John Bradford
I was able to reproduce this using Administrator 1.1.2.  I used a test database with four test tables with a varying number of rows and keys (see attached test.sql file) and ran numerous queries, some from QueryBrowser and some from the MySQL CommandLine Client, some w/o a WHERE clause and some based on an equal predicate for the PK column.  The "ConnectionHelath" tab always showed the proper spike in activity, but the "Memory Health" tab was always flatlined.
[19 Sep 2005 0:24] John Bradford
Test DB creates and Inserts

Attachment: test.sql (application/octet-stream, text), 15.92 KiB.

[19 Sep 2005 0:25] John Bradford
Forgot to mention that I was testing against a 5.0.12 server on WinXP.
[19 Sep 2005 15:32] Doug Hunting
I suppose I should mention that I was testing it against a Linux Server running 5.0.12...
[5 Oct 2005 12:35] Vladimir Kolesnikov
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.mysql.com/documentation/ and the instructions on
how to report a bug at http://bugs.mysql.com/how-to-report.php

Additional info:

Both graphs work ok for me, although Key Cache Hitrate graphs shows zeros. It's ok as it's formula is 100-(^[Key_reads]/^[Key_read_requests])*100

and in my case there were 5 key reads and read requests, i.e. the above formula gives 0. To check actual values of the server vars you can use 'show status [like]' statement. E.g.:

mysql> show status like 'key%';
+------------------------+-------+
| Variable_name          | Value |
+------------------------+-------+
| Key_blocks_not_flushed | 0     |
| Key_blocks_unused      | 8077  |
| Key_blocks_used        | 4     |
| Key_read_requests      | 5     |
| Key_reads              | 5     |
| Key_write_requests     | 3     |
| Key_writes             | 3     |
+------------------------+-------+
7 rows in set (0.00 sec)