calculate mysql memory

At startup, mysql will use some memory.

Some of the memory is pre-allocated for “key_buffer” and “innodb_buffer_pool_size” ( and other things ).

Is it possible to determine how much memory is used for the server itself without the pre-allocation part ?

Thanks in advance.


Check below link, it might be helpful for calculating memory consumption. ql-memory-usage-with-valgrind-massif/


That helps a lot.