Description:
I observe a strange behavior of one of my MySQL instances. According to system metrics it consumes around 93Gb of RAM.
PID USERNAME SIZE RSS STATE PRI NICE TIME CPU PROCESS/NLWP
28969 70 110362M 93398M sleep 59 0 91:25:30 0.110% mysqld/445
But
select * from sys.memory_global_total;
gives me only 25.97 GiB memory consumed and this value corresponds to values from my.cnf
pmap running on mysqld process shows me that a lot of memory consuming by heap pieces ~4Gb size per piece.
0000000110000000 3932160 3932160 3932160 - 256M rwx---- [ heap ]
0000000200000000 3932160 3932160 3932160 - 256M rwx---- [ heap ]
00000002F0000000 3932160 3932160 3932160 - 256M rwx---- [ heap ]
00000003E0000000 3932160 3932160 3932160 - 256M rwx---- [ heap ]
00000004D0000000 3932160 3932160 3932160 - 256M rwx---- [ heap ]
00000005C0000000 3932160 3932160 3932160 - 256M rwx---- [ heap ]
00000006B0000000 3932160 3932160 3932160 - 256M rwx---- [ heap ]
00000007A0000000 3932160 3932160 3932160 - 256M rwx---- [ heap ]
0000000890000000 3932160 3932160 3932160 - 256M rwx---- [ heap ]
0000000980000000 3932160 3932160 3932160 - 256M rwx---- [ heap ]
0000000A70000000 3932160 3932160 3932160 - 256M rwx---- [ heap ]
0000000B60000000 3932160 3932160 3932160 - 256M rwx---- [ heap ]
0000000C50000000 3932160 3932160 3932160 - 256M rwx---- [ heap ]
0000000D40000000 3932160 3932160 3932160 - 256M rwx---- [ heap ]
0000000E30000000 3932160 3932160 3932160 - 256M rwx---- [ heap ]
0000000F20000000 3932160 3932160 3932160 - 256M rwx---- [ heap ]
0000001010000000 3932160 3932160 3932160 - 256M rwx---- [ heap ]
0000001100000000 3932160 3932160 3932160 - 256M rwx---- [ heap ]
00000011F0000000 3932160 3932160 3932160 - 256M rwx---- [ heap ]
00000012E0000000 3932160 3932160 3932160 - 256M rwx---- [ heap ]
00000013D0000000 3932160 3932160 3932160 - 256M rwx---- [ heap ]
00000014C0000000 3932160 3932160 3932160 - 256M rwx---- [ heap ]
00000015B0000000 524288 524288 524288 - 256M rwx---- [ heap ]
the last heap piece currently stops grows, but I'm not sure that it will not increase in the future.
Any suggestion on how to find out why memory grows and don't release?
How to repeat:
I can't reproduce this bug anywhere