clint--- via discuss <discuss@lists.mariadb.org> writes:
I suspect this is something more recent as this issue just showed up with 10.11.6 for us. Short of valgrind or dumping a (massive) core file, is there some other way to see current allocations in mariadb?
i_s.processlist has memory usage per thread: SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST; SELECT command, memory_used, max_memory_used FROM INFORMATION_SCHEMA.PROCESSLIST WHERE command="Slave_worker"; And you can also try SHOW GLOBAL STATUS LIKE "%memory_used%"; If one of these show excessive memory usage, that's a place to start. If not, then maybe it's some non-accounted memory usage. Or it could be malloc internal fragmentation. You can try the command: mysqladmin debug It prints in the server error log some internal memory statistics from the malloc implementation, like this: Memory status: Non-mmapped space allocated from system: 11759616 Number of free chunks: 127 Number of fastbin blocks: 1 Number of mmapped regions: 44 Space in mmapped regions: 79798272 Maximum total allocated space: 0 Space available in freed fastbin blocks: 48 Total allocated space: 9955376 Total free space: 1804240 Top-most, releasable space: 73968 Estimated memory (with thread stack): 93351936 Global memory allocated by server: 17005952 Memory allocated by threads: 419216 There is some description of these fields in `man mallinfo`. If the numbers reported by malloc are much smaller than what you see in actual system usage, then maybe internal malloc memory fragmentation is the issue. - Kristian.