zabbix的mysql数据库导致磁盘IO一直90%以上,访问卡的一逼
改了配置文件最后好了
[root@root /]# cat /etc/my.cnf [mysqld] datadir=/Data/mysql socket=/var/lib/mysql/mysql.sock user=mysql symbolic-links=0 wait_timeout=1000 interactive_timeout=1000 max-connect-errors=100000 max-connections=5000 #这个参数主要作用是缓存innodb表的索引,数据,插入数据时的缓冲,内存的50%-80% innodb_buffer_pool_size = 15000M #innodb_additional_mem_pool_size = 16M #innodb_log_buffer_size = 64M #innodb_log_file_size = 256M #Server接受的数据包大小,有时候大的插入和更新会受参数限制导致大数据写入或者更新失败 max_allowed_packet = 32M #指定索引缓冲区的大小,它决定索引处理的速度,尤其是索引读的速度 key_buffer_size = 2000M table_open_cache = 256 sort_buffer_size = 1024K net_buffer_length = 32K read_buffer_size = 512K read_rnd_buffer_size = 1024K myisam_sort_buffer_size = 16M slow_query_log=1 thread_cache_size=32 long_query_time=2 local-infile=0 log-bin=mysql-bin binlog_format=mixed server-id = 10 character_set_server=utf8 sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES skip-character-set-client-handshake = 1 skip-name-resolve #开启binlog日志 #log-bin=mysql-bin #只保留7天bin-log日志 #expire_logs_days = 7 [mysqld_safe] log-error=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid [myisamchk] key_buffer_size = 20M sort_buffer_size = 20M read_buffer = 2M write_buffer = 2M