Configuring the application server for optimal performance

Several server settings on the application server affect overall system performance. The optimum WebSphere® Application Server configuration settings vary from one deployment to another.

About this task

To configure WebSphere Application Server for optimal performance, make the adjustments listed in this topic. Ensure there are sufficient resources, including CPU, memory, network, and I/O, available on each server to support the settings chosen. To determine whether current settings are appropriately sized, you can use the WebSphere Application Server Performance Tuning Toolkit to monitor a running WebSphere server instance.
Note: You can export a PDF report showing averaged activity during the test. To do so, start monitoring right after the test starts; stop monitoring just before the test ends. Disconnect from the server, right-mouse click the new log entry that appears under the server name, generate the report, and then export the report to a PDF file.
CAUTION:
Setting values too high can overload the database.

Use the WebSphere Integrated Solutions Console to configure the application server for optimal performance.

Data sources

About this task

Attention: DB2® recommends a transaction isolation level of CS for maximum concurrency. However, WebSphere Application Server applies a default transaction isolation level of RS to data source connection pools. With the RS isolation level, DB2 locks all qualifying rows read in a transaction; with the CS isolation level, DB2 only locks the row or rows being updated. An effect of using RS is that access to affected tables can become serialized, severely limiting concurrency. This issue is a regular source of performance bottlenecks, so it is critical to override the default behavior in WebSphere Application Server.

Procedure

  1. Override the default transaction isolation level from Read Stability (RS) to Cursor Stability (CS):
    1. Click Resources > JDBC > Data sources.
    2. Click the name of the Counter Fraud DB data source.
    3. In the Additional Properties section, click Custom properties and locate webSphereDefaultIsolationLevel.
    4. In the Value field, type 2 (READ COMMITTED) to specify Cursor Stability and then click OK.
    5. Repeat the preceding steps for all WebSphere data sources.
    6. Restart WebSphere Application Server to activate the changes.
  2. Set the number of connections for the Counter Fraud database data source on the WebSphere server instance:
    1. Navigate to Resources > JDBC > Data sources.
    2. Click the name of the Counter Fraud DB data source.
    3. In the Additional Properties section, click Connection pool properties.
    4. Apply the recommended connection pool settings and then click OK.
      Table 1. Recommended connection pool properties for Counter Fraud Management data sources
      Property Setting
      Maximum connections = 800 (500 for Activation Specifications + 300 Web Container)
      Connection timeout 300 seconds
      Maximum connections 200 connections
      Minimum connections 0 connections
      Reap time 180 seconds
      Unused timeout 300 seconds
      Aged timeout 0 seconds
      Purge policy EntirePool
      Note: The maximum number of connections must, at a minimum, equal the sum of WMQJCAResourceAdapterPoolSize and WebContainer threads. Otherwise, waits and timeouts can occur.
      CAUTION:
      Do not set the Maximum Connections value too high as it could cause resource exhaustion on the database server under load, potentially leading to a crash.
  3. Increase the statement cache size for the Counter Fraud DB data source on the WebSphere server instance:
    1. Navigate to Resources > JDBC > Data sources.
    2. Click the name of the Counter Fraud DB data source.
    3. In the Additional Properties section, click WebSphere Application Server data source properties.
    4. Increase the value for the Statement cache size property from the default of 10 statements, to 100 statements.

JVM

About this task

To help with memory analysis, add the following JVM parameters to ICFMServer:

Procedure

Specify appropriate settings for the Java Virtual Machine (JVM):

  1. Navigate to Application servers > counter_fraud_server > Process definition > Java Virtual Machine.
  2. In the Generic JVM arguments field, add the following parameters to help debug memory issues should they arise:
    -Xdump:stack:events=allocation,filter=#25m 
    -Xgcpolicy:gencon 
    -verbose:gc 
    -Xverbosegclog:${SERVER_LOG_ROOT}/verbosegc.%Y%m%d.
    %H%M%S.%pid.txt,20,10000
  3. To revise heap settings, navigate to Application servers > ICFMServer > Process definition > Java Virtual Machine.
  4. Specify JVM heap settings that are appropriately sized to handle average and peak workloads. For the application server, the lowest acceptable value for the initial heap size is 2048 MB, and the lowest acceptable value for the maximum heap size is 5120 MB. Tuning the JVM heap size minimizes the number of lengthy garbage collection pauses, and the frequency of full garbage collections that are caused by insufficient heap space. If garbage collection runs too infrequently, the extra time that is required to complete garbage collection can negatively affect Counter Fraud performance. The JVM heap size must be balanced with the number of instances in the application server cluster.

Thread Pools

Procedure

In the Thread pool properties section, set the Minimum number of threads and Maximum number of threads field values. The maximum value needs to be at least equal to the number of subscribers.

For high throughput scenarios, consider increasing the value of properties in the WebSphere profile on the application server to provide increased throughput for the Java Message Service (JMS) and Message-Driven Beans (MDBs).

  1. In the navigation pane, click Resources > JMS > JMS providers to display a list of JMS providers.
  2. Click the WebSphere MQ messaging provider (Node=ICFMNode) and then click Resource adapter properties to view the configuration for the properties.
  3. Set max connections (WMSRAResourceAdapterSize) to 500 (100 for each activation specification).
  4. Navigate to Servers > Server Types > WebSphere application servers > ICFMServer > Thread pools > WebContainer and enter 300 for Maximum Size.
  5. Increase maximum connections and maximum batch size to 100 for queue connection factories:
    1. Navigate to Resources > JMS > Queue connection factories > CounterFraudCF > Session pool, and increase the Maximum connections to 100.
    2. Navigate to Resources > JMS > Queue connection factories > CounterFraudCF > Connection pools, and increase the Maximum connections to 100.
    3. Navigate to Resources > JMS > Queue connection factories > CounterFraudCF > Advanced properties, and increase the Maximum batch size to 100.
    4. Navigate to Resources > JMS > Queue connection factories > CounterFraudEventCF > Session pool, and increase the Maximum connections to 100.
    5. Navigate to Resources > JMS > Queue connection factories > CounterFraudEventCF > Connection pools, and increase the Maximum connections to 100.
    6. Navigate to Resources > JMS > Queue connection factories > CounterFraudEventCF > Advanced properties, and increase the Maximum batch size to 100.
  6. Increase maximum server sessions and maxPoolDepth to 100 for activation specifications:
    1. Navigate to Resources > JMS > Activation specifications > AnalysisRequestSpec > Advanced properties, and increase the Maximum server sessions to 100.
    2. Navigate to Resources > JMS > Activation specifications > AnalysisRequestSpec > Custom properties, and increase the maxPoolDepth to 100.
    3. Navigate to Resources > JMS > Activation specifications > AnalysisResponseSpec > Advanced properties, and increase the Maximum server sessions to 100.
    4. Navigate to Resources > JMS > Activation specifications > AnalysisResponseSpec > Custom properties, and increase the maxPoolDepth to 100.
    5. Navigate to Resources > JMS > Activation specifications > FolioMDBSpec > Advanced properties, and increase the Maximum server sessions to 100.
    6. Navigate to Resources > JMS > Activation specifications > FolioMDBSpec > Custom properties, and increase the maxPoolDepth to 100.
    7. Navigate to Resources > JMS > Activation specifications > PublishRequestSpec > Advanced properties, and increase the Maximum server settings to 100.
    8. Navigate to Resources > JMS > Activation specifications > PublishRequestSpec > Custom properties, and increase the maxPoolDepth to 100.
    9. Navigate to Resources > JMS > Activation specifications > SPSSInvokeSpec > Advanced properties, and increase the Maximum server settings to 100.
    10. Navigate to Resources > JMS > Activation specifications > SPSSInvokeSpec > Custom properties, and increase the maxPoolDepth to 100.