MySQL database optimisation

MySQL database optimisation

Our database is loaded by full-text search requests. The problem was that MySQL server CPU usage was constantly about 100% with close to 0% of Memory usage.
research brought me to the article Mysql full text search cause high usage CPU
Among answers I found an interesting tool

Get the script and run

I got the following output:

So, I found that I need to increase query_cache_size and thread_cache_size values.
I executed the following commands in mysql:

Now, MySQL server consumes about 4% of memory and occasionally raises CPU usage up to 100% for a very short time, so it doesn’t influence the whole server performance.