Bug 955760

Summary: Enable GZIP compression for RHQ 4.7
Product: [Other] RHQ Project Reporter: Mike Thompson <mithomps>
Component: Core UIAssignee: John Mazzitelli <mazz>
Status: ON_QA --- QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.6CC: hrupp, mazz
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Firefox gzip encoding none

Description Mike Thompson 2013-04-23 18:11:28 UTC
The old AS4 version of RHQ had Gzip compression we need to enable this for the new AS7 version.

http://stackoverflow.com/questions/2994420/enabling-gzip-compression-for-jboss

To Test, look in the HTTP header for Content-encoding(not Accept-encoding it will be there already from the browser) and gzip should be in there.

This will reduce the size of the downloads and speed up the overall browser performance.

Comment 1 Mike Thompson 2013-04-30 19:14:54 UTC
I have verified that adding:

<system-properties>
        <property name="org.apache.coyote.http11.Http11Protocol.COMPRESSION" value="on"/>
        <property  name="org.apache.coyote.http11.Http11Protocol.COMPRESSION_MIME_TYPES" value="text/javascript,text/css,text/html"/>

</system-properties>

to: 

 dev-container/jboss-as/standalone/configuration/standalone-full.xml

results in gzip compression

Passing on to mazz for installer config.

Comment 2 John Mazzitelli 2013-04-30 19:21:56 UTC
If these are just sys props you need added, we should put these in rhq-server startup script, rather than in the standalone xml, since we do this for other sysprops as well:

in rhq-server.sh, add them here:

# Add the JVM opts that we always want to specify, whether or not the user set RHQ_SERVER_JAVA_OPTS.
# Note that the double equals for the policy file specification IS INTENTIONAL
RHQ_SERVER_JAVA_OPTS="-Dapp.name=rhq-server ${RHQ_SERVER_JAVA_OPTS} -Drhq.server.home=${RHQ_SERVER_HOME} -Djboss.server.log.dir=${_LOG_DIR_PATH} -Djava.awt.headless=true -Dsun.lang.ClassLoader.allowArraySyntax=true -Djboss.server.default.config=standalone-full.xml -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.security.manager -Djava.security.policy==${RHQ_SERVER_HOME}/bin/rhq-server.security-policy ${_JBOSS_DEBUG_LOGGING}"

That is for UNIX/Linux. For windows we put them here:

rhq-server-wrapper.conf

where you need to add additional wrapper.java.additional.# values (don't forget to bump up the numbers in rhq-server-wrapper.inc (which is for developers, read the top of that file).

Comment 3 John Mazzitelli 2013-04-30 19:42:02 UTC
git commit to master: bcda4cd

Comment 4 Mike Foley 2013-04-30 20:06:34 UTC
Possible browser sensitivity...

IE  http://support.microsoft.com/kb/837251
FF http://support.mozilla.org/en-US/questions/935596

QE ... this needs to be qualified in all supported browsers 

IE8 (deprecated) , IE9, FF17 ... including charts.

Comment 5 Mike Thompson 2013-04-30 20:38:53 UTC
Bugfix to above commit. Fixed syntax error.

git master commit id: 813c498

Comment 6 Mike Thompson 2013-04-30 20:39:55 UTC
Created attachment 741992 [details]
Firefox gzip encoding

Comment 7 Mike Thompson 2013-04-30 20:41:54 UTC
See above attachment image for gzip header verification via Firefox Firebug plugin.

Comment 8 Mike Thompson 2013-05-01 17:22:45 UTC
Tested with both FF17 and IE9. No issues with FF17 and IE9 works fine however, it doesn't seem to compress the files (so no speed increases for IE9). In IE dev tools the size isn't reduced and the content-encoding does not specify gzip although the accept-content has gzip (meaning the browser is capable).

We might want to create a separate bug on this to track this minor issue.