zabbix5.2.6性能优化-001、数据库的优化
zabbix 数据库cpu
iostat |head -1|awk '{print $1,$2,$(NF-1),$NF}' Linux 3.10.0-1062.4.3.el7.x86_64 (48 CPU)
zabbix 数据库内存
free -h total used free shared buff/cache available Mem: 188G 89G 616M 3.8G 98G 94G Swap: 0B 0B 0B
zabbix 数据库磁盘
df -h /dev/sda1 931G 27G 904G 3% / /dev/sdb 2.2T 502G 1.7T 23% /data
优化前的参数:优化 <innodb_buffer_pool_size> 建议关闭zabbix server,然后重启数据库
egrep "innodb_buffer_pool_size|innodb_buffer_pool_instances" my.conf innodb_buffer_pool_size = 2G innodb_buffer_pool_instances = 2
优化后的参数:
egrep "innodb_buffer_pool_size|innodb_buffer_pool_instances" my.conf innodb_buffer_pool_size = 80G innodb_buffer_pool_instances = 16
优化前:可以看到优化前 系统盘最高能延迟能到17620ms 数据盘最高能到235.7898ms
优化后的效果:可以看到最大延迟只有3.5088s