In this post we will look into the MySQL memory utilization estimation or calculation based on the global variables. Using a simple stored procedure call you can get the memory usage estimation for the present MySQL instance.
We have global buffers which are allocated irrespective of connections as and when mysql server is started. Along with that mysql server allocates memory to each thread to perform respective tasks.
So the formula goes:
Mysql Server Memory Usage = Sum of Global Buffers + (number of Connection * Per thread memory variables).