最近我的Mysql有个奇怪的问题,很多进程的状态都是preparing,而且等待时间非常长,造成数据库负载很高,但同样的数据库在其他服务器运行良好,不知道是哪里设置有问题,请大神帮助,...
最近我的Mysql有个奇怪的问题,很多进程的状态都是preparing,而且等待时间非常长,造成数据库负载很高,但同样的数据库在其他服务器运行良好,不知道是哪里设置有问题,请大神帮助,以下是mysql 的主要配置参数,服务器配置,4×4核,16g内存
[mysqld]
port = 3306
socket = /var/lib/mysql/mysql.sock
character_set_server=utf8
collation_server=utf8_general_ci
default-storage-engine = MyISAM
skip-innodb
###############################################
max_heap_table_size = 4096M
key_buffer_size = 4096M
#added by star 2012-8-8
table_open_cache = 40240
table_definition_cache = 40960
query_cache_size = 56M
thread_cache_size = 256
open_files_limit = 65480
tmp_table_size = 4096M
concurrent_insert=2
low_priority_updates = 1
long_query_time = 3
log_slow_queries =/var/log/slow.log
log-queries-not-using-indexes
back_log = 500
log-error=/var/log/mysqld.log
join_buffer_size = 32M
max_connections = 256
#added by star 2012-8-9
#big_tables=ON
skip-locking
#key_buffer_size = 384M
max_allowed_packet = 1M
#table_open_cache = 512
sort_buffer_size = 16M
read_buffer_size = 2M
read_rnd_buffer_size = 8M
myisam_sort_buffer_size = 64M
展开