14.7.5 Using TPV Advisor

The Performance Advisor in Tivoli Performance Viewer (TPV) provides advice to help tune systems for optimal performance and gives recommendations on inefficient settings by using collected Performance Monitoring Infrastructure (PMI) data. Advice is obtained by selecting the Advisor link in the TPV navigation tree.

Figure 14-16 Select Advisor in TPV

The Performance Advisor in TPV provides more extensive advice than the Runtime Performance Advisor. For example, TPV provides also advice on setting the dynamic cache size, setting the JVM heap size, and using the DB2 Performance Configuration Wizard.

In order to obtain advice, follow these steps:

1. Enable PMI data collection

Enable PMI data collection (as explained in Enabling the PMI service) and select the Extended statistic set. The statistic set (also called the monitoring level) determines which data counters are enabled. You can select the statistics set dynamically on the Runtime tab, without restarting the server. The monitoring level directly influences the type of advice you obtain.

The Performance Advisor in TPV normally uses the Extended monitoring level but it can also use a few of the more expensive counters (to provide additional advice) and provide advice on which counters can be enabled. For example, advice for session size needs the PMI statistic set to All. Or, use the PMI Custom monitoring level to enable the Servlet Session Manager SessionObjectSize counter. The monitoring of the SessionSize PMI counter is expensive and is therefore not in the Extended PMI statistic set.

2. In the Administrative Console, click Monitor and Tuning -> Performance Viewer -> Current Activity.

3. Simulate a production level load

Simulate a realistic production load for your application, if you use the Performance Advisor in a test environment, or do any other performance tuning. The application must run this load without errors. This simulation includes numbers of concurrent users typical of peak periods, and drives system resources, for example, CPU and memory to the levels that are expected during peak production periods. The Performance Advisor can provide some type of advice only when the CPU utilization exceeds a sufficiently high level. For example, advice on thread pool size is only issued if there is a problem with it (which can usually only be detected when the system is under load). Other types of advice, however, are always issued, for example, advice related to the Prepared statement cache or the Servlet Session module.

4. Start logging for Tivoli Performance Viewer (refer to Recording in a log file).

5. Click Advisor in the Tivoli Performance Viewer navigation tree. Tuning advice appears in the advice table shown in Figure 14-17. Click Refresh All Advice on top of the advice table to recalculate the advice based on the current data in the buffer. Since PMI data is taken over an interval of time and averaged to provide advice, details within the advice message appear as averages.

Figure 14-17 Tivoli Performance Viewer Advisor table

6. Change your appserver configuration based on the advice. Because Tivoli Performance Viewer refreshes advice at a single instant in time, take the advice from the peak load time.

As mentioned before, the Performance Advisors attempt to distinguish between loaded and idle conditions, misleading advice might be issued if the advisor is enabled while the system is ramping up or down. This result is especially likely when running short tests. Although the advice helps in most configurations, there might be situations where the advice hinders performance. Because of these conditions, advice is not guaranteed. Therefore, test the environment with the updated configuration to ensure it functions and performs well.

Over a period of time the advisor might issue differing advice. The differing advice is due to load fluctuations and run-time state. When differing advice is received, look at all advice and the time period over which they were issued. You must take advice during the time that most closely represents the peak production load.

Performance tuning is an iterative process. After applying advice, simulate a production load, update the server configuration based on the advice, and retest for improved performance. This procedure is continued until optimal performance is achieved.

Important: As we already stated, make sure that only one parameter is changed and then the results monitored. This provides an effective method of backing out of the change if it proves detrimental to the environment. Also, making multiple changes could result in undesired results, because many options are dependent on other settings.


Next