Bug #93781 Memory usage statistics in ndbinfo.memoryusage table are way off
Submitted: 2 Jan 2019 13:27 Modified: 2 Jan 2019 14:31
Reporter: salman niazi Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S2 (Serious)
Version: OS:CentOS
Assigned to: CPU Architecture:Any

[2 Jan 2019 13:27] salman niazi
Description:
Memory usage statistics in ndbinfo.memoryusage table are way off

I am running a single node setup of (mysql-cluster-gpl-7.5.12-linux-glibc2.12-x86_64) for testing with following configuration

DataMemory=200M
IndexMemory=200M

mysql> select * from ndbinfo.memoryusage;
+---------+---------------------+--------+------------+-----------+-------------+
| node_id | memory_type         | used   | used_pages | total     | total_pages |
+---------+---------------------+--------+------------+-----------+-------------+
|       1 | Data memory         | 786432 |         24 | 315621376 |        9632 |
|       1 | Index memory        | 278528 |         34 |    327680 |          40 |
|       1 | Long message buffer | 655360 |       2560 |  67108864 |      262144 |
+---------+---------------------+--------+------------+-----------+-------------+
Both the data memory and index memory are way off. 

However, when I run an older version (mysql-cluster-gpl-7.5.5-linux-glibc2.5-x86_64) I get the correct results. 

mysql> select * from ndbinfo.memoryusage;
+---------+---------------------+--------+------------+-----------+-------------+
| node_id | memory_type         | used   | used_pages | total     | total_pages |
+---------+---------------------+--------+------------+-----------+-------------+
|       1 | Data memory         | 589824 |         18 | 209715200 |        6400 |
|       1 | Index memory        | 278528 |         34 | 105906176 |       12928 |
|       1 | Long message buffer | 655360 |       2560 |  67108864 |      262144 |
+---------+---------------------+--------+------------+-----------+-------------+

This bug is causing serious problems for us as our application monitors ndbinfo.memoryusage 

How to repeat:
as above
[2 Jan 2019 14:31] salman niazi
https://dev.mysql.com/doc/relnotes/mysql-cluster/7.6/en/dynxml-auto-changelog-difflist-mys...

I guess this is not a bug. Index memory is deprecated in 7.6.2.