How can we check if the MySQL server is utilizing high memory/RAM ?
How much memory is occupied in total by query cache ? How much memory is fragmented ?
Basically what is occupying xGB off memory by MySQL server ?
Currently running MySQL Server version 5.7.25.
Best Answer
It uses the amount specified by
query_cache_size
.If that value is more than about 50M, then it is probably slowing down the server.
The Query cache is going away; it cannot be used in any Clustering setup, and it has been removed from MySQL 8.0.
Every modification to a table triggers a purge of all entries for that table. Therefore the QC, especially a big one, is costly in busy production servers.
If you must use the QC, follow these tips:
SQL_CACHE
orSQL_NO_CACHE
in eachSELECT
, based on whether the query is likely to be repeated before it is purged.(A small percentage of production system do benefit from the QC.)
There are cryptic metrics in
SHOW GLOBAL STATUS LIKE 'Qc%';
but I can't explain them.