Monitoring and Profiling the JVM

2-10 Oracle Fusion Middleware Performance and Tuning Guide

2.6.1.2 Initialization Parameters for Oracle 11g

The following table provides information on some important performance-related database initialization parameters for Oracle 11g database. PL_SQL_CODE_TYPE PLSQL_CODE_TYPE specifies the compilation mode for PLSQL library units. INTERPRETED: PLSQL library units are compiled to PLSQL bytecode format. Such modules are executed by the PLSQL interpreter engine. NATIVE: PLSQL library units are compiled to native machine code. Such modules are executed natively without incurring any interpreter impacts. PROCESSES Sets the maximum number of operating system processes that can be connected to Oracle concurrently. The value of this parameter must account for Oracle background processes. SESSIONS parameter is deduced from this value. PGA_AGGREGATE_TARGET Specifies the target aggregate PGA memory available to all server processes attached to the instance. SGA_MAX_SIZE This parameter is the maximum size of the SGA for a running instance. Set this parameter to the amount of memory that you want dedicated for the SGA, which includes the following memory pools: ■ Database buffer cache ■ Shared pool ■ Large pool ■ Java pool Ensure that you regularly monitor the buffer cache hit ratio and size the SGA so that the buffer cache has an adequate number of frames for the workload. The buffer cache hit ratio may be calculated from data in the view VSYSSTAT. Also the view VDB_CACHE_ADVICE provides data that can be used to tune the buffer cache. SGA_TARGET Setting this parameter to a nonzero value enables Automatic Shared Memory Management. Consider using automatic memory management, both to simplify configuration and to improve performance. TRACE_ENABLED TRACE_ENABLED controls tracing of the execution history, or code path, of Oracle. Oracle Support Services uses this information for debugging. Although the performance impacts incurred from processing is not excessive, you may improve performance by setting TRACE_ENABLED to FALSE. Table 2–3 Important inti.ora Oracle 11g Database Tuning Parameters Database Parameter Description AUDIT_TRAIL AUDIT_TRAIL enables or disables database auditing. MEMORY_MAX_ TARGET MEMORY_MAX_TARGET specifies the maximum value to which a DBA can set the MEMORY_TARGET initialization parameter. MEMORY_TARGET MEMORY_TARGET specifies the Oracle system-wide usable memory. The database tunes memory to the MEMORY_TARGET value, reducing or enlarging the SGA and PGA as needed. PGA_AGGREGATE_ TARGET Specifies the target aggregate PGA memory available to all server processes attached to the instance. In Oracle 11g, set MEMORY_TARGET instead of setting SGA and the PGA separately. SGA_MAX_SIZE Consider setting MEMORY_TARGET instead of setting SGA and the PGA separately. SGA_TARGET Consider setting MEMORY_TARGET instead of setting SGA and the PGA separately. Table 2–2 Cont. Important init.ora Oracle 10g Database Tuning Parameters Database Parameter Description Top Performance Areas 2-11

2.6.2 Tuning Redo Logs Location and Sizing

Managing the database IO load balancing is a non-trivial task. However, tuning the redo log options can provide performance improvement for applications running in an Oracle Fusion Middleware environment, and in some cases, you can significantly improve IO throughput by moving the redo logs to a separate disk. The size of the redo log files can also influence performance, because the behavior of the database writer and archiver processes depend on the redo log sizes. Generally, larger redo log files provide better performance by reducing checkpoint activity. It is not possible to provide a specific size recommendation for redo log files, but redo log files in the range of a hundred megabytes to a few gigabytes are considered reasonable. Size your online redo log files according to the amount of redo your system generates. A rough guide is to switch logs at most once every twenty minutes. Set the initialization parameter LOG_CHECKPOINTS_TO_ALERT = TRUE to have checkpoint times written to the alert file. The complete set of required redo log files can be created during database creation. After they are created, the size of a redo log size cannot be changed. New, larger files can be added later, however, and the original smaller ones can be dropped. For more information see the Oracle Database Performance Tuning Guide.

2.6.3 Automatic Segment-Space Management ASSM

For permanent tablespaces, consider using automatic segment-space management. Such tablespaces, often referred to as bitmap tablespaces, are locally managed tablespaces with bitmap segment space management. For backward compatibility, the default local tablespace segment-space management mode is MANUAL. For more information, see Free Space Management in Oracle Database Concepts, and Specifying Segment Space Management in Locally Managed Tablespaces in Oracle Database Administrators Guide.

2.7 Reuse Database Connections

Creating a database connection is a relatively resource intensive process in any environment. Typically, a connection pool starts with a small number of connections. As client demand for more connections grow, there may not be enough in the pool to satisfy the requests. WebLogic Server creates additional connections and adds them to the pool until the maximum pool size is reached. One way to avoid connection creation delays is to initialize all connections at server startup, rather than on-demand as clients need them. This may be appropriate if your load is predictable and even. Set the initial number of connections equal to the maximum number of connections in the Connection Pool tab of your data source configuration. Determine the optimal value for the Maximum Capacity as part of your pre-production performance testing. If your load is uneven, and has a much higher number of connections at peak load than at typical load, consider setting the initial number of connections equal to your typical load. In addition, consider setting the maximum number of connections based on your supported peak load. With these configurations, WebLogic server can free up some connections when they are not used for a period of time. For more information, see Tuning Data Source Connection Pool Options in Oracle Fusion Middleware Configuring and Managing JDBC for Oracle WebLogic Server.