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.

Hi,

Check below link, it might be helpful for calculating memory consumption.
http://www.mysqlperformanceblog.com/2013/01/09/profiling-mys ql-memory-usage-with-valgrind-massif/

Thanks.

That helps a lot.