IBM Support

Network performance issues bringing you down? Try mod_deflate http compression!

Technical Blog Post


Abstract

Network performance issues bringing you down? Try mod_deflate http compression!

Body

Over the recent weeks I've been working on some performance issues, which are not so much Maximo related or server related, but related to network performance. Maximo screens draw slow and there is high latency between the end work stations and where the server is located.  During the investigation of this we looked in to network compression. In  Maximo have one option that can be enabled via the web.xml and this is Gzip application compression, however HTTP compression can be more efficient and utilize less resources.  HTTP Compression is enabled outside the application on the HTTP Server.

We have DCF's out there on both of these topics, the reason I'm writing the blog to this is to bring it forward as it did help out considerably is a recent situation and the DCFs are quite old and may not be widely known. You can view our DCF documentation on the on Gzip, which also links out to HTTP Server compression here.

So how do we enable HTTP compression? First you need to ensure you are using the IBM HTTP Server or Apache 2.0 or higher. Going forward I will describe locations based off the IBM HTTP Server.

The changes are simple, first locate your httpd.conf file, for the IHS you can find it under the IBM\HTTPServer\conf folder.  In this file you will see the following line which is commented, you will need to un-comment it.

#LoadModule deflate_module modules/mod_deflate.so

If you don't see this line you can add it under #LoadModule rewrite_module modules/mod_rewrite.so so your file will currently look like the screenshot below.

image

Now search for BrowserMatch "^gnome-vfs" redirect-carefully in the same httpd.conf file and add the following section under it.

#
# The following directive enables http compression
#
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
#Highest 9 - Lowest 1
DeflateCompressionLevel 3

Your httpd.conf should now look like you see below, if this is true then you can save the file.

After making the changes you will need to restart your HTTP Server

In discussions I've had DeflateCompressionLevel 3 is the recommended value. If deciding to increase this value, remember,  the higher compression level you have the more CPU processing occurs. If you do not have a lot of system resources you may see performance issues in another form other then networking.

HTTP compression can be tuned in other ways as well to tell it which files you want to compress and those you may not want to compress. This can be done using output filters, for example below will state that only html, plain text and xml will be compressed.

        SetOutputFilter DEFLATE                                         
        AddOutputFilterByType DEFLATE text/html text/plain text/xml   

For example if you want to add CSS to the filter, you can append text/css to the AddOutputFilterByType so it looks like this

       AddOutputFilterByType DEFLATE text/html text/plain text/xml  text/css

The output filters can be added to the http compression directive as you see below.

#
# The following directive enables http compression
#

SetOutputFilter DEFLATE                                         
AddOutputFilterByType DEFLATE text/html text/plain text/xml  
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
#Highest 9 - Lowest 1
DeflateCompressionLevel 3

If you are having network issues that are showing in Maximo and causing strain on your users you may want to look in to the above information as well as the linked DCF, this could help increase network performance at some of those slower sites.  Before doing this, an important thing to take in to consideration when choosing between gzip and http compression is that only ONE should be an enabled at a time, so if your currently using Gzip ensure you comment it out in the web.xml then rebuild and redeploy your ear files, before moving to http compression.

As always any questions, concerns or comments please post below.

[{"Business Unit":{"code":"BU005","label":"IoT"}, "Product":{"code":"SSLKT6","label":"Maximo Asset Management"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"","Edition":""}]

UID

ibm11131981