FAQ : Frequently Asked Questions
FAQ Table of contents
blue line
26. Q:  What is better for performance: a single activation group for all CGIs, or a different activation group for each program ?

A:  When any of the GetHtmlxxx subprocedures is called, the CGISRVPGM2 service program checks to see if the HTML files being read are the same as they were the last time. If so, and none of the files' timestamps has changed, the subprocedure, in order to enhance performance, does not reread and reprocess the HTML files. If multiple programs are running in the same activation group and these programs use different sets of HTML files, each time a different program uses GetHtmlxxx, the files are reread and reprocessed. This can hurt performance.

Therefore, the general recommendation is to define a different activation group for each CGI except when it makes sense for a group of related CGI programs to share an activation group.

For example, if program A uses HTML files 1, 2, 3; program B uses HTML files 1, 2, 4; and program C uses HTML files 1, 2, 5, have all three programs share the same activation group and call GetHtmlIfsMult with HTML files 1, 2, 3, 4, 5. The service program will read all 5 HTML files only once when it is called by the first program that runs. Of course, you must use the same section name delimiters and variable name delimiters in all the files and you should make sure that section names are unique across all the files.

It is also recommended that you read iSeries Performance Capabilities Reference, V5R2. Go to Chapter 6 (Webserver and Websphere performance) and open Section 6.1 (HTTP server powered by Apache). At page 73 you see a table reporting performance measurements: CGI (named activation) perform 6 times faster than CGI (new activation) because they consume 6 times less CPW.

blue line