码迷,mamicode.com
首页 > 数据库 > 详细

Zabbix配置文件的参数优化和Zabbix的数据库优化

时间:2017-03-30 20:01:28      阅读:1806      评论:0      收藏:0      [点我收藏+]

标签:zabbix优化

Zabbix配置文件的参数优化

StartPollers=60

StartPollersUnreacheable=80

StartTrappers=20

StartPingers=100

StartDiscoverers=120 #zabbix提示进程繁忙时修改此参数,最大二百五,建议100左右,值大消耗cpu性能大

CacheSize=1024M

StartDBSyncers=16

HistoryCacheSize=1024M

TrendCacheSize=1024M

HistoryTextCacheSize=512M

LogSlowQueries=1000


Zabbix的数据库优化

egrep -v "(^#|^$)" /etc/my.cnf

[client]

port=3306

socket=/var/lib/mysql/mysql.sock

[mysqld]

port=3306

socket=/var/lib/mysql/mysql.sock

skip-external-locking

character-set-server=utf8

slow_query_log

slow_query_log_file=/var/log/mysql/slowquery.log

long_query_time=2

log-error=/var/log/mysql/log-error.log

skip-name-resolve

max_connections=5000

back_log=300

table-cache=4096

max_allowed_packet=32M

max-heap-table-size=128M

key_buffer_size=128M

sort-buffer-size=16M

join-buffer-size=16M

net_buffer_length=8K

read_buffer_size=256K

read_rnd_buffer_size=512K

myisam_sort_buffer_size=8M

thread-cache-size=16

thread-concurrency=24

query-cache-size=4096M

query-cache-limit=4M

tmp-table-size=128M

log_warnings

innodb_file_per_table=1

innodb_file_io_threads=4

innodb_open_files=2048

innodb_buffer_pool_size=10G

innodb_additional_mem_pool=16M

innodb_thread_concurrency=16

innodb_max_dirty_pages_pct=90

log-bin=mysql-bin

binlog_format=mixed

server-id=1

[mysqldump]

quick

max_allowed_packet=16M

[mysql]

no-auto-rehash

[myisamchk]

key_buffer_size=20M

sort_buffer_size=20M

read_buffer=2M

write_buffer=2M

[mysqlhotcopy]

interactive-timeout
















本文出自 “yht的运维笔记” 博客,请务必保留此出处http://yht1990.blog.51cto.com/9014030/1911778

Zabbix配置文件的参数优化和Zabbix的数据库优化

标签:zabbix优化

原文地址:http://yht1990.blog.51cto.com/9014030/1911778

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!