Oracle Metadata Service MDS Performance Tuning

Tuning Integration Flows 28-11 Seconds to Trust an Idle Pool Connection, since the connection was tested or successfully used by an application, WebLogic Server skips the connection test. ■ Test Reserved Connections If Test Reserved Connections is enabled on your data source, when an application requests a database connection, WebLogic Server tests the database connection before giving it to the application. If the request is made within the time specified for Seconds to Trust an Idle Pool Connection, since the connection was tested or successfully used by an application, WebLogic Server skips the connection test before delivering it to an application. ■ Seconds to Trust an Idle Pool Connection Seconds to Trust an Idle Pool Connection is a tuning feature that can improve application performance by minimizing the delay caused by database connection testing, especially during heavy traffic. However, it can reduce the effectiveness of connection testing, especially if the value is set too high. The appropriate value depends on your environment and the likelihood that a connection will become defunct. ■ Remove Infected Connections Enabled Specifies whether a connection will be removed from the connection pool after the application uses the underlying vendor connection object. If you disable removing infected connections, you must ensure that the database connection is suitable for reuse by other applications. When set to true the default, the physical connection is not returned to the connection pool after the application closes the logical connection. Instead, the physical connection is closed and re-created. When set to false, when the application closes the logical connection, the physical connection is returned to the connection pool and can be reused by the application or by another application. For more information, see: ■ Generating Automatic Workload Repository Reports in Oracle Database Performance Tuning Guide ■ Monitoring Performance in Oracle Database Administrator’s Guide ■ JDBC Data Source: Configuration: Connection Pool in Oracle Fusion Middleware Oracle WebLogic Server Administration Console Online Help ■ Tuning Data Source Connection Pool Options in Oracle Fusion Middleware Configuring and Managing JDBC for Oracle WebLogic Server

28.2.8 Oracle Metadata Service MDS Performance Tuning

For optimal performance of MDS APIs, the database schema for the MDS repository must be monitored and tuned by the database administrator. This section lists some recommended actions to tune the database repository: ■ Collect schema statistics ■ Increase redo log size ■ Reclaim disk space ■ Monitor the database performance 28-12 Developers Guide for Oracle Application Integration Architecture Foundation Pack

28.2.8.1 Using Database Polling Interval for Change Detection

MDS employs a polling thread which queries the database to gauge if the data in the MDS in-memory cache is out of sync with data in the database. This can happen when metadata is updated in another JVM. If it is out of sync, MDS clears any out of date-cached data so subsequent operations see the latest versions of the metadata. MDS invalidates the document cache and the MDS cache, so subsequent operations have the latest version of the metadata. The polling interval can be configured or changed post deployment through MBeans. The element maps to the ExternalChangeDetection and ExternalChangeDetectionInterval attributes of the MDSAppConfig MBean. Prior to packaging the Enterprise ARchive EAR file, you can configure the polling interval by adding this entry in adf-config.xml: Example 28–2 Configuring the Polling Interval in the adf-config.xml mds-config persistence-config external-change-detection enabled=true polling-interval-secs=T persistence-config mds-config In Example 28–2 , T specifies the polling interval in seconds. The minimum value is 1. Lower values cause metadata updates that are made in other JVMs, to be seen more quickly. It is important to note, however, that a lower value can also create increased middle tier and database CPU consumption due to the frequent queries. By default, polling is enabled true and the default value of 30 seconds should be suitable for most purposes. Consider increasing the value to a higher number if the number of updates to MDS are few and far between. For more information, see Changing MDS Configuration Attributes for Deployed Applications in Oracle Fusion Middleware Administrators Guide.

28.2.8.2 Tuning Cache Configuration

MDS uses a cache to store metadata objects and related objects such as XML content in memory. MDS Cache is a shared cache that is accessible to all users of the application on the same JVM. If a metadata object is requested repeatedly, with the same customizations, that object may be retrieved more quickly from the cache a warm read. If the metadata object is not found in the cache a cold read, then MDS may cache that object to facilitate subsequent read operations depending on the cache configuration, the type of metadata object and the frequency of access. Cache can be configured or changed post deployment through MBeans. This element maps to the MaximumCacheSize attribute of the MDSAppConfig mbean. For more information, see Changing MDS Configuration Attributes for Deployed Applications in Oracle Fusion Middleware Administrators Guide. Having a correctly sized cache can significantly improve throughput for repeated reading of metadata objects. The optimal cache size depends on the number of metadata objects used and the individual sizes of these objects. Prior to packaging the Enterprise ARchive EAR file, you can manually update the cache-config in adf-config.xml, by adding the entry shown in Example 28–3 . Example 28–3 Manually Updating the cache-config in adf-config.xml mds-config Tuning Integration Flows 28-13 cache-config max-size-kb200000max-size-kb cache-config mds-config For more information about tuning the MDS and the database, see Optimizing Instance Performance in Oracle Database Performance Tuning Guide, and Oracle Metadata Service MDS Performance Tuning in Oracle Fusion Middleware Performance and Tuning Guide.

28.3 Configuring the Common SOA Infrastructure

This section discusses properties that impact the entire SOA infrastructure.

28.3.1 Configuring SOA Infrastructure Properties

These settings apply to all SOA Composite applications running in the SOA infrastructure. The properties set at this level impact all deployed SOA composite applications, except those composites for which you explicitly set different audit level values at the composite application or service engine levels. AIA recommends configuring at least the following properties. auditLevel This property sets the audit trail logging level. This property controls the amount of audit events that are logged by a process. AIA recommends the following value to be set to this property: ■ Production: The BPEL service engine does not capture the payload. The payload details are not available in the flow audit trails. Payload details for other BPEL activities are collected, except for assign activities. This level is optimal for most normal operations and testing. captureCompositeInstanceState Enabling this option may result in additional run time overhead during instance processing. This option provides for separate tracking of the running instances. All instances are captured as either running or not running. This information displays later in the State column of the composite instances tables for the SOA Infrastructure and SOA composite application, where it shows the counts of running instances versus total instances. You can also limit the view to running instances only Valid states are Running, Completed, Faulted, Recovery Needed, Stale, Terminated, Suspended, and State Not Available. The Running and Completed states are captured only if this check box is selected. Otherwise, the state is set to Unknown. The conditional capturing of these states is done mainly to reduce the performance overhead on SOA Infrastructure run time. Note: If this property is disabled and you create a new instance of a SOA composite application, a new instance is created, but the instance does not display as running, faulted, stale, suspended, terminated, completed, or requiring recovery in the table of the Dashboard page of the composite application. This is because capturing the composite state of instances is a performance-intensive process. AIA recommends disabling this property.