Question

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.

Was it helpful?

Solution

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:

  • No more than 50M (except on Aurora)
  • Use SQL_CACHE or SQL_NO_CACHE in each SELECT, 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.

Licensed under: CC-BY-SA with attribution
Not affiliated with dba.stackexchange
scroll top