You need to update server configuration.
1. Open terminal
2. Put command : sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf
3. Find following variables
key_buffer_size = 16M
max_allowed_packet = 16M
thread_stack = 192K
thread_cache_size = 8
query_cache_limit = 1M
query_cache_size = 16M
Change To
key_buffer_size = 160M
max_allowed_packet = 160M
thread_stack = 1920K
thread_cache_size = 80
query_cache_limit = 1024M
query_cache_size = 2048M
4. Restart mysql : sudo /etc/init.d/mysql restart
5. Restart apache2 sudo systemctl restart apache2
6. Check CPU usage : ps -eo pid,ppid,cmd,%mem,%cpu --sort=-%cpu | headFor more Information please Refer : https://dev.mysql.com/doc/refman/5.7/en/server-configuration.html
No comments:
Post a Comment