Enable GZIP compression in IBM Cognos. (Performance Tip)

Just out of curiosity I ran an empty Cognos Connection page with GTmetrix to see what would come up. The result is shown below, not great, and when I find the time, I might dig a bit deeper into it in future posts. But for now I noticed this; “Compressing the following resources with gzip could reduce their transfer size by 154.5KiB (76% reduction).” As Cognos Connection is one of the most shown pages, I considered that it might be interesting to spend some time on it.

Enable GZIP compression in IBM Cognos

This is how it goes: 

Enabling gzip happens on the webserver. In the case of IBM Cognos Express you have two web servers. You use IIS for TM1 Web and Apache for the Cognos BI part. So is you only run Reporter or you are using IBM Cognos BI, you will have one (Apache). That is if you are using a standard setup. Actually you are using Tomcat as application engine and as web server, but that includes Apache for the web server part. So log on to the server and go to  the location “\yourinstallationlocation\IBM Cognos Express\tomcat\conf” and open up the file “server.xml” with an editor, notepad will do, I use Notepad++.

Search for this bit:


Enable GZIP compression in IBM Cognos.

And add this bit between the connector tags:

noCompressionUserAgents=”gozilla, traviata”

This will actually enable gzip compression for html, xml, javascript and css.  So it finally looks like this:

Enable GZIP compression in IBM Cognos.

Go to IBM Cognos Express Manager and restart the services. 

After doing this I went back to the website of GTmetrix and I submitted the same URL of IBM Cognos Connection again a couple of times. This is the result:

Enable GZIP compression in IBM Cognos

So in loading time it didn’t generate as much as I was hoping for, roughly 6-7% faster. But then gzip is about size, not speed, maybe in other cases it might be more. If the same result can be obtained in general I guess it is still worth doing. In terms of page size the result is more impressive, from 226kb to 71,9kb, so a 68% page size reduction, that might be important if network is an issue. Also remember, I did this with an empty Cognos Connection page. So I am willing to think that these results are the bottom limit.

Worth doing? Up to you, but it’s an easy fix. Let me know in the comments if you did it, and especially if you ran into issues.

Cognos Service