How does MySQL use memory?
MySQL has three actions to help improve the performance of database operations: allocate, reserve some buffers, and cache. The default configuration allows a MySQL server to boot a server with a minimum of 512 MB of RAM. You can improve the performance of MySQL by increasing the values of some system variables related to caches and buffers, as I mentioned in the previous sections.
Suppose your MySQL 8.0 has the following values when running commands:
- SHOW GLOBAL STATUS LIKE 'max_used_connections'; gives 200
- SHOW GLOBAL STATUS LIKE 'Threads_created'; gives 200
- SHOW GLOBAL STATUS LIKE 'connections'; gives 400
The common question that arises is, Do I have to increase the thread_cache_size variable?
This is often subject to the following context: "I'm running SHOW PROCESSLIST, I see open connections...