Zabbix Performance Tuning 6.0
Zabbix Performance Tuning 6.0
Visualization
Performance
Zabbix is able to deliver 2 million of values per minute or around 30.000 of values per second
In real life performance would be worse. Why?!
Zabbix performance tuning
100 100
1 000 1 000
10 000 10 000
100 500
1 000 5 000
10 000 50 000
Choose update frequency and
duration of storage carefully
Zabbix performance tuning
Performance
History analysis
Slow Fast
affects performance
Database size Large Fits into memory
of Zabbix. But not so
much!
Low-level Update frequency Update frequency
detection 30s, 15m, 30m 1h, 1d, 7d
Performance
Different views on performance
Performance
Common problems of initial setup
Performance
Visible symptoms of bad performance
Performance
Nice view of queue of items
Zabbix performance tuning
Performance
Nice view of queue of items during a problem state
Zabbix performance tuning
Performance
Identify Visualization
Step 1
History Analysis
Zabbix performance tuning
Identify
Main utilities
top, ntop, iostat, vmstat, sar
Zabbix itself
# ps ax | grep sync
zabbix_server: history syncer #1 [synced 1845 items in 0.257111 sec, syncing history]
zabbix_server: history syncer #2 [synced 24 items in 0.060314 sec, idle 4 sec]
zabbix_server: history syncer #3 [synced 0 items in 0.000018 sec, idle 4 sec]
zabbix_server: history syncer #4 [synced 0 items in 0.000009 sec, syncing history]
Values change?
Zabbix performance tuning
Identify
Main utilities
top, ntop, iostat, vmstat, sar
Zabbix itself
# ps ax | grep sync
history syncer #1 [synced 1020 items in 285.198752 sec, syncing history]
history syncer #2 [synced 915 items in 285.177799 sec, syncing history]
history syncer #3 [synced 3401 items in 284.936376 sec, syncing history]
history syncer #4 [synced 1194 items in 285.280719 sec, syncing history]
Identify
Get internal statistics
The actual VPS value
zabbix[wcache, values, all]
zabbix[queue,1m] amount of items with a delay of more than 1 minute
Zabbix server components
Alerter, Configuration syncer, DB watchdog, discoverer, escalator, history syncer, http poller,
housekeeper, icmp pinger, ipmi poller, poller, trapper, etc.
Zabbix server cache
history write cache, value cache, trend write cache, vmware cache, etc.
Ready templates:
Template App Zabbix Server
Template App Zabbix Proxy
Template App Zabbix Agent
Zabbix performance tuning
Identify
Zabbix performance tuning
Identify
Debug mode
There is a problem, but it is not clear what kind of problem?
Enable debugging mode for the process:
# zabbix_server -R log_level_increase=alerter
Search in the log for information about the problem (grep, etc.):
/var/log/zabbix/zabbix_server.log
Zabbix performance tuning
Identify
How to know that the performance of the DB is bad?
Zabbix server configuration file, zabbix_server.conf
LogSlowQueries=3000
Zabbix performance tuning
Identify
Main utilities
top, ntop, iostat, vmstat, sar
DB statistics, innotop
Zabbix performance tuning
Identify
Main utilities
top, ntop, iostat, vmstat, sar
DB statistics, innotop
Identify
Slow DB?
Zabbix performance tuning
Identify
Debug mode
Zabbix performance tuning
Identify
Debug mode
Identify
Debug mode
Identify
Debug mode
Tune
Tune number of processes (example)
Zabbix server configuration file, zabbix_server.conf:
StartPollers=80
StartPingers=10
StartPollersUnreachable=80
StartIPMIPollers=10
StartTrappers=20
StartDBSyncers=6
Zabbix performance tuning
Tune
How to know when it is time to tune Zabbix configuration?
Failures in graphs or 100% load
Zabbix performance tuning
Tune
InnoDB is better than MyISAM
Look at the data
mysqladmin status / variables (or innotop)
InnoDB
innodb_file_per_table = 1
innodb_buffer_pool_size=<large> (~75% of total RAM)
innodb_buffer_pool_instances = 8
innodb_flush_log_at_trx_commit = 2
innodb_flush_method = O_DIRECT
innodb_log_file_size = 256M
Do not use
Query history
Zabbix performance tuning
Tune
Problem with Web server
Optimize configuration
Try nginx
4
Improve
Zabbix performance tuning
Improve
Table partitioning
It is a way to split large tables into smaller partitions.
Make sense for historical tables:
history_* and trends*
Benefits:
Easy to remove older data
Significantly better performance
Zabbix performance tuning
Improve
No table partitioning
Zabbix
Server History
& GUI
Zabbix performance tuning
Improve
How to know when it is time to apply partitioning?
Trigger “Zabbix housekeeper processes more than 75% busy” is in problem state for hours or days
The performance of housekeeper is dropping
Zabbix performance tuning
Improve
I still need better performance
Run Zabbix components on separate servers!
Improve
I still need better performance
Run Zabbix components on separate servers!
Improve
I still need better performance
All data collection is done using a proxy
ZABBIX
ZABBIX
ZABBIX SERVER PROXY
ZABBIX
PROXY
PROXY
DB
Data DB
Zabbix performance tuning
Improve
Why to use proxy?
Zabbix Proxy "converts" passive checks into active
The load is distributed between the proxies
If one proxy is overloaded, network nodes can be moved to another proxy
Easy maintenance
Caching data when Zabbix server is not available
Zabbix performance tuning
Improve
Checklist
Zabbix internal checks are done
Otherwise, you don't know anything about Zabbix health!
Zabbix configuration is tuned
Database performance is tuned
Removing history is not used for history tables
Zabbix performance tuning
Improve
Additional reading
CONTACT US:
Phone: +420 800 244 442
Web: https://www.initmax.cz
Email: [email protected]
LinkedIn: https://www.linkedin.com/company/initmax
Twitter: https://twitter.com/initmax1