mysql my.cnf 适用于 50GB RAM 服务器

mysql my.cnf 适用于 50GB RAM 服务器

我的数据库服务器(双四核 50 GB RAM)遇到了加载问题

平均负载:4.26、6.78、11.25

这是当前的 my.cnf,我可以优化它吗?

[client]
port            = 3306
socket          = /var/run/mysqld/mysqld.sock

[mysqld_safe]
socket          = /var/run/mysqld/mysqld.sock
nice            = 0

[mysqld]
user            = mysql
pid-file        = /var/run/mysqld/mysqld.pid
socket          = /var/run/mysqld/mysqld.sock
port            = 3306
    basedir         = /usr
datadir         = /var/lib/mysql
tmpdir          = /tmp
language        = /usr/share/mysql/english
skip-external-locking

key_buffer              = 150M
key_buffer_size = 512M
max_allowed_packet      = 16M
thread_stack            = 128K
thread_cache_size       = 128
open-files              = 8192

myisam-recover          = BACKUP
max_connections        = 1000
table_cache            = 8096
join_buffer_size        = 2M
tmp_table_size          = 10G
max_heap_table_size     = 10G
innodb_buffer_pool_size = 10G
innodb_additional_mem_pool_size = 128M
innodb_log_file_size = 100M
log-slow-queries        = /var/log/mysql/slow.log
sort_buffer_size        = 5M
net_buffer_length       = 5M
read_buffer_size        = 2M
read_rnd_buffer_size    = 12M
thread_concurrency     = 16
ft_max_word_len = 30
ft_min_word_len = 2

query_cache_limit       = 4M
query_cache_size        = 512M

该网站有大约2000名在线用户。

答案1

相关内容