Performance-based setup information

The performance of MicroStrategy Web (JSP) can be increased by configuring it on various component levels. These additional setup settings are not required, but if you want to increase the performance of MicroStrategy Web (JSP), some changes must be done before or after the deployment procedure. This section provides the following configurations:

Setting the Java heap size
Precompiling JSP files
Disable/relax auto-reload parameters
Configuring Apache Web server to serve static files

Setting the Java heap size

The Java heap size for the WebLogic Server can be increased by modifying the MEM_ARGS variable in the startWebLogic.sh script.

To increase the Java heap size

1 Open the startWebLogic.sh script from /WEBLOGIC_MYDOMAIN_FOLDER/bin/startWebLogic.sh.
2 Define the following line in the script:
MEM_ARGS=”-Xms512m -Xmx1024m”

This line reflects an initial Java heap size of 512 MB. MicroStrategy recommends the initial java heap size be set at a minimum of 512MB, assuming the machine has enough memory space. This value may need to be modified to reflect the requirements of your specific environment. Refer to your third-party application server documentation for information on how to determine a satisfactory Java heap size for your environment.

3 Stop and start the application server.

Precompiling JSP files

To avoid the time taken to load the Web pages in the application server when you access it for the first time, you must precompile the Java Server Pages (JSP) files before deploying the application. Do this by setting the application server to load all the pages in the application before deployment. Thus, when you connect for the first time, the pages are already loaded and the performance is better.

To precompile the JSP files

1 Open the weblogic.xml file located in the /WEB-INF directory.
2 In the jsp-descriptor section, set the keepgenerated and the precompile parameters to TRUE, as follows:
	 <jsp-descriptor>
				:
				:
		 <jsp-param>
			<param-name>keepgenerated</param-name>
			<param-value>TRUE</param-value>
		 </jsp-param>
		 <jsp-param>
			<param-name>precompile</param-name>
			<param-value>TRUE</param-value>
		 </jsp-param>
				:
				:
	 </jsp-descriptor>
3 Save the file.

Disable/relax auto-reload parameters

To disable/relax auto-reload parameters, complete the following:

Set the pageCheckSeconds parameter
Set the WebLogic Reload Period parameter

Each parameter is explained below.

Set the pageCheckSeconds parameter

The pageCheckSeconds parameter sets the interval, in seconds, at which the WebLogic Server checks to see if JSP files have changed and need recompiling. Dependencies are also checked and recursively reloaded if changed.

You can set the following values:

Value

Description

0

Pages are checked on every request.

-1

The page is not checked until the server is restarted. Any classes used by the JSP page that live in the servlet classpath are also reloaded.

n

Interval (in seconds) in which WebLogic Server checks if JSP files have changed. For example, if this is set to 1, WebLogic checks the pages every second to see if the JSP has changed and needs recompiling.

To set the pageCheckSeconds parameter

1 Open the weblogic.xml file located in the /WEB-INF directory.
2 In the jsp-descriptor section, set the pageCheckSeconds parameter value. For example, the following code sets the value to -1:
	 <jsp-descriptor>
				:
				:
		 <jsp-param>
			<param-name>pageCheckSeconds
			</param-name>
			<param-value>-1</param-value>
		 </jsp-param>
				:
				:
	 </jsp-descriptor>
3 Save the file.

Set the WebLogic Reload Period parameter

In WebLogic, the Reload Period parameter sets how often WebLogic checks whether a servlet has been modified. If the servlet has been modified, WebLogic reloads it. As the MicroStrategy Web (JSP) servlets do not change after they have been deployed, MicroStrategy recommends that you disable the reload period by setting it to -1. A value of -1 means never reload, and a value of 0 means always reload.

Use the appropriate procedure below, depending on whether you have MicroStrategy Web (JSP) deployed as a duplicate WAR file.

To set the WebLogic Reload Period

1 Open the weblogic.xml file located in the /WEB-INF directory.
2 In the container-descriptor section, set the servlet-reload-check-secs parameter value. For example, the following code sets the value to -1:
<container-descriptor>
<servlet-reload-check-secs>-1</servlet-reload-check-secs>
</container-descriptor>
3 Save the file.

Configuring Apache Web server to serve static files

Because Web servers are tuned to effectively serve static files, the perceived performance of MicroStrategy Web (JSP) is significantly enhanced if image, style sheet, and JavaScript files are served via the Apache Web server, and the WebLogic Server handles only the servlet requests. Do this by editing two main parameters, Alias and MatchExpression, in the Apache configuration file httpd.conf.

The Alias parameter is used to create a virtual directory in the Apache Web server. The virtual directory is needed to serve static files such as images, style sheets, and JavaScript.
The MatchExpression parameter is used to configure the Apache plug-in so that the WebLogic Server handles only the servlet requests.

To configure the Apache Web server to serve static files

1 To change the Alias parameter, add the following lines in the httpd.conf file:
Alias /MicroStrategy/images/"/WEBLOGIC_MYDOMAIN_FOLDER/autodeploy/MicroStrategy/images/"
<Directory "/WEBLOGIC_MYDOMAIN_FOLDER/autodeploy/MicroStrategy/images">
     Options Indexes MultiViews
     AllowOverride None
     Order allow, deny
     Allow from all
</Directory>

These code excerpts assume the application name is MicroStrategy. See Deploying with WebLogic and Apache (Solaris) for information on default folder structure.

2 Repeat the previous step for the JavaScript and style sheet folders, replacing the word images in the previous code with the folder name where the JavaScript and style sheet files are located.
3 Change the MatchExpression parameter by typing */servlet/* in the MatchExpression parameter. For example,
	 <IfModule mod_weblogic.c>
        WebLogicHost 10.15.133.56
        WebLogicPort 7001
        MatchExpression */servlet/*
	 </IfModule>
4 Stop and start the Apache Web server using the commands apachectl start and apachectl stop.

The Web server now serves image (GIF), style sheet (CSS), JavaScript, and all other static files, thus reducing the load on the application server and increasing the application’s performance.