Initialization Parameters for Oracle 10g

2-12 Oracle Fusion Middleware Performance and Tuning Guide

2.8 Enable Data Source Statement Caching

When you use a prepared statement or callable statement in an application or EJB, there may be a performance impact associated with the processing of the communication between the application server and the database server and on the database server. To minimize the processing impact, enable the data source to cache prepared and callable statements used in your applications. When an application or EJB calls any of the statements stored in the cache, the server reuses the statement stored in the cache. Reusing prepared and callable statements reduces CPU usage on the database server, improving performance for the current statement and leaving CPU cycles for other tasks. Each connection in a data source has its own individual cache of prepared and callable statements used on the connection. However, you configure statement cache options per data source. That is, the statement cache for each connection in a data source uses the statement cache options specified for the data source, but each connection caches its own statements. Statement cache configuration options include: ■ Statement Cache Type—The algorithm that determines which statements to store in the statement cache. ■ Statement Cache Size—The number of statements to store in the cache for each connection. The default value is 10. You should analyze your databases statement parse metrics to size the statement cache sufficiently for the number of statements you have in your application. You can use the Administration Console to set statement cache options for a data source. See Configure the statement cache for a JDBC data source in the Oracle Fusion Middleware Oracle WebLogic Server Administration Console Online Help. For more information on using statement caching, see Increasing Performance with the Statement Cache in the Oracle Fusion Middleware Configuring and Managing JDBC for Oracle WebLogic Server.

2.9 Control Concurrency

Limiting concurrency, at multiple layers of the system to match specific usage needs, can greatly improve performance. This section discusses a few of the areas within Oracle Fusion Middleware where concurrency can be controlled. When system capacity is reached, and a web server or application server continues to accept requests, application performance and stability can deteriorate. There are several places within Oracle Fusion Middleware where you can throttle the requests to avoid overloading the mid-tier or database tier systems and tune for best performance. ■ HTTP Connection Limits ■ Setting the Maximum Number of Connections for Data Sources ■ Tuning the WebLogic Sever Thread Pool ■ Tuning Oracle WebCenter Concurrency ■ Tuning BPEL Concurrency

2.9.1 HTTP Connection Limits

Oracle HTTP Server uses directives in httpd.conf. This configuration file specifies the maximum number of HTTP requests that can be processed simultaneously, logging details, and certain limits and time outs. Top Performance Areas 2-13 For more information on modifying the httpd.conf file, see Configuring Oracle HTTP Server in Oracle Fusion Middleware Administrators Guide for Oracle HTTP Server. You can use the MaxClients and ThreadsPerChild directives to limit incoming requests to WebLogic instances from the Oracle HTTP Server based on your expected client load and system resources. The following sections describe some Oracle HTTP Server tuning parameters related to connection limits that you typically need to tune based on your expected client load. See Chapter 5, Oracle HTTP Server Performance Tuning for more information and a more complete list of tunable parameters.

2.9.1.1 MaxClientsThreadsPerChild

The MaxClients property specifies a limit on the total number of server threads running, that is, a limit on the number of clients who can simultaneously connect. If the number of client connections reaches this limit, then subsequent requests are queued in the TCPIP system up to the limit specified in the ListenBackLog directive. You can configure the MaxClients directive in the httpd.conf file up to a maximum of 8K the default value is 150. If your system is not resource-saturated and you have a user population of more than 150 concurrent HTTP connections, you can improve your performance by increasing MaxClients to increase server concurrency. Increase MaxClients until your system becomes fully utilized 85 is a good threshold. When system resources are saturated, increasing MaxClients does not improve performance. In this case, the MaxClients value could be reduced as a throttle on the number of concurrent requests on the server. If the server handles persistent connections, then it may require sufficient concurrent httpd server processes to handle both active and idle connections. When you specify MaxClients to act as a throttle for system concurrency, you need to consider that persistent idle httpd connections also consume httpd processes. Specifically, the number of connections includes the currently active persistent and non-persistent connections and the idle persistent connections. When there are no httpd server threads available, connection requests are queued in the TCPIP system until a thread becomes available, and eventually clients terminate connections. You can define a number of server processes and the threads per process ThreadsPerChild to handle the incoming connections to Oracle HTTP Server. The ThreadsPerChild property specifies the upper limit on the number of threads that can be created under a server child process. Note: The MaxClients parameter is applicable only to UNIX platforms and on Microsoft Windows mpm_winnt, the same is achieved through the ThreadsPerChild and ThreadLimit parameters. Note: ThreadsPerChild, StartServers, and ServerLimit properties are inter-related with the MaxClients setting. All of these properties must be set appropriately to achieve the number of connections as specified by MaxClients. See Table 5–1, Oracle HTTP Server Configuration Properties for a description of all the HTTP configuration properties.