Speed up Zabbix UI with Apache compression

Once you start monitoring a lot of hosts through Zabbix you may find that the frontend UI starts to slow while loading pages.  A quick way to combat that sluggishness is to enable compression in Apache.

Apache uses the mod_deflate module to compress output from the server before being sent to the browser.

The quick and dirty way to enable mod_deflate for Zabbix is to modify your Apache configuration file, httpd.conf, and uncomment

LoadModule deflate_module modules/mod_deflate.so

After enabling the deflate module, you will need to add the following to your httpd.conf file.  I added it in the same area as some other IfModule entries

# enable output from your server to be compressed before being sent to the client
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/plain text/xml

This entry will only compress the listed file types, html, plain text, and xml.  Check out the Apache httpd page for more details.


Save your configuration file and then test them before restarting Apache

/usr/sbin/apachectl -t

Restart Apache and you are good.

You can verify that compression is working with the Live HTTP Headers add-on to firefox, among others.

You will see entries related to Content-Encoding in the server responses

Content-Encoding: gzip

I have seen significant decreases in page load time by enabling compression.

I wrote a post on speed optimization techniques using xcache here. These 2 posts will help you improve your Zabbix front end performance.

You should notice a big improvement in the speed of your Zabbix UI after implementing these quick optimizations.

Let me know if this helps you.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s