Memory monitor seems wrong

Hi all,

I have recently setup a server with PMM to monitor our MariaDB servers (10.1.37), hoping that it could help us detect the cause of a problem related to high memory usage, however the memory stats seem a little off.

For example, for one of our server the “MySQL internal memory overview” shows:
[TABLE=“border: 0, cellpadding: 0, cellspacing: 0”]
[TR]
[TD=“width: 240”]System Memory[/TD]
[TD=“width: 84, align: right”]16652042240[/TD]
[/TR]
[TR]
[TD]InnoDB Buffer Pool Data[/TD]
[TD=“align: right”]1278623744[/TD]
[/TR]
[TR]
[TD]InnoDB Log Buffer Size[/TD]
[TD=“align: right”]67108864[/TD]
[/TR]
[TR]
[TD]InnoDB Additional Memory Pool Size[/TD]
[TD=“align: right”]8388608[/TD]
[/TR]
[TR]
[TD]InnoDB Dictionary Size[/TD]
[TD=“align: right”]641407506[/TD]
[/TR]
[TR]
[TD]Key Buffer Size[/TD]
[TD=“align: right”]131072[/TD]
[/TR]
[TR]
[TD]Query Cache Size[/TD]
[TD=“align: right”]0[/TD]
[/TR]
[TR]
[TD]Adaptive Hash Index Size[/TD]
[TD=“align: right”]51562112[/TD]
[/TR]
[/TABLE]

The total is a little less than 2 GB.

However, looking at the output of the “top” command, I see this:

top - 10:11:31 up 198 days, 7:38, 2 users, load average: 0.04, 0.07, 0.13
Tasks: 124 total, 1 running, 123 sleeping, 0 stopped, 0 zombie
%Cpu(s): 4.5 us, 0.3 sy, 0.0 ni, 94.5 id, 0.5 wa, 0.0 hi, 0.0 si, 0.2 st
KiB Mem : 16261760 total, 8185988 free, 6635724 used, 1440048 buff/cache
KiB Swap: 14679344 total, 13690704 free, 988640 used. 9188236 avail Mem

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
5164 mysql 20 0 8565736 5.8g 10188 S 3.3 37.3 5:34.69 mysqld

so here it seems that the database is actually using almost 6 GB of RAM.

How can I see where the “missing” 4 GB are allocated?