Mysql takes up heavy load on CPU and eats most of the ram
Hi,
I'm running a dedicated server with Xeon 8 cores and 16 GB RAM...
I was trying to update mysql optimization settings for my.cnf as per recommendation by mysqltuner.pl. But still mysql utilizes heavy load of CPU and Heavy RAM.
How to apply recommendation by mysqltuner.pl---
------------------
Run OPTIMIZE TABLE to defragment tables for better performance
Adjust your join queries to always utilize indexes---> how to apply this settings.
my.cnf settings---
Please suggest the best possible settings for the said above.. Thanking you,
[mysqld]
local-infile=0
connect_timeout=360
wait_timeout=2400
interactive_timeout=2400
default-storage-engine=MyISAM
max_connections = 400
max_user_connections = 100
key_buffer_size=1400M
join_buffer_size=4M
sort_buffer_size=512K
read_rnd_buffer_size=512K
slow_query_log=1
slow_query_log_file=mysql-slow.log
long_query_time=0.1
query_cache_type = 1
query_cache_size = 150M
query_cache_limit = 1M
max_allowed_packet=32M
tmp_table_size=256M
max_heap_table_size=256M
open_files_limit=100000
table_definition_cache=2000
table_open_cache=6000
thread_cache_size=64
innodb_buffer_pool_size=662M
innodb_file_per_table=1
Please suggest the best possible settings for the said above.. Thanking you,
-
Hello :) Could you post the full output of the MySQL tuner results so we can get a better idea of your existing performance statistics? Thank you. 0 -
Hi, After that from forum I got to know mysqltuner does not support mysql 5.5 any more... I'm using tuning-primer.sh which says the following- bash tuning-primer.sh -- MYSQL PERFORMANCE TUNING PRIMER -- - By: Matthew Montgomery - MySQL Version 5.5.36-cll x86_64 Uptime = 0 days 21 hrs 33 min 51 sec Avg. qps = 84 Total Questions = 6550459 Threads Connected = 35 Warning: Server has not been running for at least 48hrs. It may not be safe to use these recommendations To find out more information on how each of these runtime variables effects performance visit: [url=http://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html]MySQL :: MySQL 5.5 Reference Manual :: 5.1.4 Server System Variables Visit
One time I increased the value of table cache and set slow query log. After that I optimize tables...that's it. Please update asap, since server becomes unstable. I'm using centos 6.4, Xeon 8 cores with 16 GB ram. Even, I tried default mysql values but it did not work... Waiting for your revert,0 -
[quote="webhosting-k999, post: 1614842">Please update asap, since server becomes unstable.
Most advice for MySQL tuning will come from other users. It's not officially supported by cPanel. You mentioned that MySQL is unstable. Is it failing? If so, what do you see in your MySQL error log when MySQL fails? Thank you.0 -
Hi, I have seen mysql cpu usage goes 100% sometimes 200% and even 500%. I'm totally helpless to manage it. Although I have been adjusting the settings... But no use. Can you suggest the best? 0 -
Try running the following command when you notice heavy MySQL usage: mysqladmin processlist
Look for excessive usage from specific databases. Thank you.0 -
adjust my.cnf innodb_buffer_pool_size = 800M table_open_cache = 7000 key_buffer_size = 3500M thread_cache_size = 20 then restart 0
Please sign in to leave a comment.
Comments
6 comments