Efficient synchronization of proxy configuration in Zabbix 2.0.7

Until Zabbix 2.0.7 proxies used a simple algorithm for their configuration synchronization – overwriting the old configuration with a new one. Even unchanged records were updated. It produced a lot of SQL updates even when there were no changes in configuration.

It worked good enough until one user wanted to synchronize a heavy loaded proxy (800 hosts, 120 000 items, 2000 NVPS) configuration every 7 minutes (see the graph).

The synchronization was taking about 2-3 minutes, produced more than 5000 updates per second and caused a heavy impact on performance of other Zabbix processes by blocking the hosts table. During this time poller processes could not update host status data.

In Zabbix 2.0.7 the synchronization aims to generate a minimum number of SQL queries by doing more work in the Zabbix proxy itself. The old configuration is read into memory and compared with the new configuration, record by record. If corresponding records exist in both old and new configurations every field is compared to find out differences. If all fields match, no update is necessary. If a few fields differ an SQL update statement is composed only for those fields.

Tests show that a configuration with 500 hosts and 600 000 items can be synchronized in ~11 seconds if there are few or no changes (not counting ~14 sec for getting 63 MBytes of configuration data from master server). That is 5 times faster than before (depends on the number of items).

After upgrading to Zabbix 2.0.7 the synchronization produces no updates if configuration is not changed as shown in the graph. The main improvement is less blocking of tables and shorter waiting times for other processes.

Performance improvements in 2.0

The performance of Zabbix is being constantly improved, and there were significant performance improvements back in 1.8. Then pretty much every Zabbix 1.8 series release added some more benefits, reduced database access and so on. With the 2.0 release there are more performance benefits expected, but there’s so little time to gather some information… luckily, some users do provide us with empirical evidence ūüôā

Continue reading “Performance improvements in 2.0”

Zabbix Running on a $25 Device!?

Everything in the world of electronics gets smaller, while performance continues to grow. I know I should not compare those computers from 1960 with what we have now, but I still get amazed all the time.

The thing about modern computers is that sometimes it is a waste of resources to see them using a small fraction of their computing power to perform some very small task. It is like seeing a huge crane lifting a grocery paper bag. Of course, modern computers allow you to run many tasks simultaneously, sharing the power. You may use virtualization to run several logical machines on one device. But still sometimes there are cases when all you need is just a cheap, reliable, energy and space efficient device to do the work.

So when I heard that a company Observe IT from the UK, a potential partner of Zabbix, is willing to test-drive Raspberry Pi with Zabbix Proxy, I¬†happily¬†replied “Send it over here!”.¬†It took more than 2 long weeks for British-Latvian post offices to deliver a very lightweight box to our office. While awaiting the package, we retweeted a message from Richard Gate about¬†successfully¬†installing Zabbix on Raspberry Pi. It made us¬†jealous, but we were willing to see how it works ourselves.

So we started with a careful unpacking of the box.

Continue reading “Zabbix Running on a $25 Device!?”

Performance improvements in Zabbix 1.8, part 2

So in part 1 we found out that Zabbix 1.8.1 provided significant performance improvements over 1.6, mostly because of reduced database access. But those who have been following “What’s new” section in Zabbix manual might be aware that both 1.8.2 and 1.8.3 promised even better performance. After 1.8, that sounds quite optimistic, doesn’t it? Let’s try to get some data on that then. To have comparable data we hunted down Zabbix user verwilst again and coerced him to provide some fresh graphs – thanks again. Continue reading “Performance improvements in Zabbix 1.8, part 2”

Performance improvements in Zabbix 1.8, part 1

Zabbix is being constantly improved – functionality, usability and also performance wise. Let’s look at some practical effects on what all these performance improvements have provided in 1.8 series.

As some might recall, Zabbix 1.8 alone was promising a huge performance improvement. Back in February we actually got a confirmation on that, thanks to Zabbix user verwilst. In the first part, let’s rehash what we found out that time regarding upgrade from 1.6 to 1.8.1.

Continue reading “Performance improvements in Zabbix 1.8, part 1”