Tuning the application server using pre-defined tuning templates

You can use the Python-based tuning script, applyPerfTuningTemplate.py, along with one of its template files, to apply pre-defined performance tuning templates to your application server or cluster. The property-based template files are located in the WAS_HOME\scriptLibraries\perfTuning\V70\ directory. The path for the script files is wsadmin -f <WAS_HOME>\bin\applyPerfTuningTemplate.py.

Before you begin

Best practice: The configuration settings applied by this script and the associated tuning templates should be viewed as potential performance tuning options for you to explore or use as a starting point for additional tuning. The configuration settings that each of the pre-defined templates applies are geared towards optimizing common application server environments or scenarios. Typically, these settings improve performance for many applications.

Because optimizing for performance often involves trade-offs with features, capabilities, or functional behavior, some of these settings might impact application correctness, while other settings might be inappropriate for your environment. Please review the following documentation and consider the impact of these settings to your application inventory and infrastructure.

As with any performance tuning exercise, the settings configured by the predefined templates should be evaluated in a controlled preproduction test environment. You can then create a customized template to refine the tuning settings to meet the specific needs of your applications and production environment.

Tip: This topic references one or more of the application server log files. As a recommended alternative, you can configure the server to use the High Performance Extensible Logging (HPEL) log and trace infrastructure instead of using SystemOut.log , SystemErr.log, trace.log, and activity.log files on distributed and IBM® i systems. You can also use HPEL in conjunction with your native z/OS® logging facilities. If you are using HPEL, you can access all of your log and trace information using the LogViewer command-line tool from your server profile bin directory. See the information about using HPEL to troubleshoot applications for more information on using HPEL.
Typically, when you run the applyPerfTuningTemplate.py script, you will specify either the peak.props template file or the development.props template file to apply against the target server or cluster.
  • If you specify the peak.props template file when you run the applyPerfTuningTemplate.py script, the script applies configuration settings that are appropriate for a production environment where application changes are rare and optimal runtime performance is important.
  • If you specify the development.props template file when you run the applyPerfTuningTemplate.py script, the script applies configuration settings that are appropriate for a development environment where frequent application updates are performed and system resources are at a minimum.

In addition to these two common templates, a third template file, default.props, is provided to enable you to revert the server configuration settings back to the out-of-the-box defaults settings.

You can also create your own custom tuning template. To create a custom tuning template, copy one of the existing templates, modify the configuration settings to better fit the needs of your applications and environment, and then use the applyPerfTuningTemplate.py script to apply these customized settings. The script and properties files leverage the property file configuration management features that wsadmin provides, and can easily be augmented to tune additional server components. See the topic Using properties files to manage system configuration for more information.

About this task

Review the following table to see the configuration changes that occur based on the template file that you specify when you run the applyPerfTuningTemplate.py script. A blank cell in this table indicates that the listed parameter is not configured, or is configured back to the default settings for the server defaults.

Table 1. Tuning parameters and their template values . The table includes the tuning parameter and its value for the default template, the production template and the development template.
Parameter Server default (default.props template file) Production environment (peak.props template file) Development environment (development.props template file)
JVM Heap Size (MB)

See the topic Tuning the IBM virtual machine for Java for more information about this setting.

50 min / 256 max 512 min / 512 max 256 min / 512 max
Verbose GC

See the topic Tuning the IBM virtual machine for Java for more information about this setting.

disabled enabled disabled
JVM Diagnostic Trace (Generic JVM Arguments)

See the topic Tuning the IBM virtual machine for Java for more information about this setting.

Avoid trouble: This setting might cause issues when web services are used in certain scenarios. Therefore, if you are running web services, and are experiencing throughput optimization issues, you can remove this parameter from the script, or set the opti level to 0.
-Dcom.ibm.xml.xlxp.jaxb .opti.level=3 -Dcom.ibm.xml.xlxp.jaxb .opti.level=3 -Dcom.ibm.xml.xlxp.jaxb .opti.level=3
HTTP (9080) and HTTPS (9443) Channel maxKeepAliveRequests

See the topic HTTP transport chain custom properties for more information about this setting.

100 10000 10000
TCP Channel maxOpenConnections 20000 500 500
TCP Channel listenBacklog 511 128 128
Development Mode

See the topic Application server settings for more information about this setting.

disabled   enabled
Server Component Provisioning

See the topic Application server settings for more information about this setting.

disabled enabled enabled
PMI Statistic Set

See the topic Enabling PMI data collection for more information about this setting.

basic none none
Authentication Cache Timeout

See the topic Authentication cache settings for more information about this setting.

10 minutes 60 minutes 60 minutes
Data Source Connection Pool Size*

See the topic Connection pool settings for more information about this setting.

1 min / 10 max 10 min / 50 max  
Data Source Prepared Statement Cache Size*

See the topic WebSphere® Application Server data source properties for more information about this setting.

10 50  
ORB Pass-by-Reference**

See the topic Request Broker service settings for more information about this setting.

disabled enabled enabled
Web Server Plug-in ServerIOTimeout 900 900 900
Thread Pools (Web Container, ORB, Default)

See the topic Thread pool settings for more information about this setting.

50 min / 50 max, 10 min / 50 max, 20 min / 20 max   5 min / 10 max
Table notes:

* Indicates items that are tuned only if they exist in the configuration. For example, a data source connection pool typically does not exist until an application is installed on the application server. If these items are created after your run the script, they are given the standard server default values unless you specify other settings.

** Enabling ORB Pass-By-Reference can cause incorrect application behavior in some cases, because the Java EE standard assumes pass-by-value semantics. However, enabling this option can improve performance up to 50% or more if the EJB client and server are installed in the same instance, and your application is written to take advantage of these feature. The topic Object Request Broker service settings can help you determine if this setting is appropriate for your environment.

Following are a few subtle platform-specific tuning differences:
[Solaris]Solaris platform
[Solaris]The following Generic JVM arguments are used for both the production and development environments:
  • -XX:-UseAdaptiveSizePolicy
  • -XX:+UseParallelGC
  • -XX:+AggressiveOpts
  • -XX:+UnlockDiagnosticVMOptions -server
  • -Dcom.ibm.xml.xlxp.jaxb.opti.level=3
[HP-UX]HP-UX platform
[HP-UX]The following Generic JVM arguments are used for both the production and development environments:
  • -XX:+AggressiveOpts
  • -XX:+ForceMmapReserved
  • -XX:SurvivorRatio=16
  • -XX:+UseParallelGC
  • -Djava.nio.channels.spi.SelectorProvider=sun.nio.ch.DevPollSelectorProvider
  • -XX:-ExtraPollBeforeRead -XX:+UseSpinning
  • -Dcom.ibm.xml.xlxp.jaxb.opti.level=3
[z/OS]z/OS platform
[z/OS]The default JVM heap sizes are different than those on the other platforms:
  • Default minimum heap size: 256 MB
  • Default maximum heap size: 512 MB

Procedure

  • Start the wsadmin tool if it is not already running, and then complete one of the following actions to tune an application server or all of the application servers in a cluster.
  • Run the applyPerfTuningTemplate.py script to tune a specific server or cluster of servers running in a production environment.
    wsadmin -f applyPerfTuningTemplate.py 
    [-nodeName node_name -serverName server_name][clusterName cluster_name] -templateFile WAS_HOME\scriptLibraries\perfTuning\V70\peak.props
  • Run the applyPerfTuningTemplate.py script to tune a specific server or cluster of servers running in a development environment.
    wsadmin -f applyPerfTuningTemplate.py 
    [-nodeName node_name -serverName server_name][clusterName cluster_name] -templateFile WAS_HOME\scriptLibraries\perfTuning\V70\development.props
  • Run the applyPerfTuningTemplate.py script to change the settings for a server or a cluster back to the standard out-of-the-box default configuration settings.
    wsadmin -f applyPerfTuningTemplate.py 
    [-nodeName node_name -serverName server_name][clusterName cluster_name] -templateFile WAS_HOME\scriptLibraries\perfTuning\V70\default.props

What to do next

Conduct a performance evaluation, and tuning exercise to determine if you should further fine tune the server for your specific applications.