Short Tip: tuning Zabbix Database

I am currently running a zabbix setup which is a bit bigger than the average ones, right now it receives ~2100 new values per second, generated by 169052 items. The data is stored in a postgresql database, and I am using auto partitioning to manage the ~780gb database. This makes it easy to delete old data, so there is no need for doing an autovacuum on huge tables. The vacuum process can lock the tables which prevents the zabbix server from inserting new values for several hours. However autovacuum is useful in general, and I am glad that postgresql allows us to disable it on a per table basis. The history_uint is the table where it failes, so we disable it here:

zabbixdb=# ALTER TABLE history_uint SET (autovacuum_enabled = false, toast.autovacuum_enabled = false);
ALTER TABLE
zabbixdb=#

This will not disable the autovacuum completely on this table, sometimes it still needs to be done to prevent transaction ID wraparound failures.

This entry was posted in General, Linux, Short Tips. Bookmark the permalink.

One Response to Short Tip: tuning Zabbix Database

  1. Pingback: Short Tip: tuning Zabbix Database Part 2 | the world needs more puppet!

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.