Investigating Memory Usage Discrepancies
When there is a large discrepancy between the sum of memory usage from information_ vs what is reported in alloc_, review the internal table statistics via information_ to see where the rest of memory is being held.
SHOW STATUS EXTENDED LIKE '%Alloc_table_memory%';
+--------------------+-----------------------+
| Variable_name | Value |
+--------------------+-----------------------+
| Alloc_table_memory | 39389.780 (+0.125) MB |
+--------------------+-----------------------+
1 row in set (0.00 sec)Compare that information with the results of:
SELECT SUM(memory_use)/1024/1024/1024 MEM_GB FROM information_schema.table_statisticsWHERE 1=1 AND host = 'leaf-1.example.com';
+----------------+
| MEM_GB |
+----------------+
| 2.392731554806 |
+----------------+
1 row in set (0.76 sec)The alloc variable is showing 39 GB while table statistics shows just 2.
The next step would be to examine the md_<table> information in information_ for outliers to see where the rest of the memory is being held.md_ storing large amounts of data for each node.
Last modified: August 8, 2025