Modifying SOA Configuration Parameters JVM Tuning Parameters About Oracle Business Rules

Oracle Business Rules Performance Tuning 12-3 be equal for a collection of tests, then the simpler tests should be placed before more expensive tests.

12.2.7 Use Functions Instead of AssertXPath and Supports XPath

Most of the work done by the rules engine is done during assert, retract, or modify operations. In particular, the assertXPath method, though very convenient, may have a performance impact. The power of this method is not only that it asserts the whole hierarchy in one call, but also asserts some XLink facts for children facts to link back to parent facts. However, if these features are not needed, and you need to assert only a few levels as facts, it is better to turn off the Supports XPath for the relevant fact types and then use a function to do custom asserts. Instead of using assertXPath the following example uses a function to assert ExpenseReport and ExpenseLineItems: function assertAllObjectsFromListjava.util.List objList { java.util.Iterator iter = objList.iterator; while iter.hasNext { assertiter.next; } } function assertExpenseReport demo.ExpenseReport expenseReport { assertexpenseReport; assertAllObjectsFromListexpenseReport.getExpenseLineItem; } To improve performance of assertXPath, select the Enable improved assertXPath support for performance check box in the Dictionary Properties page in Rule Author. Taking advantage of this will require that the following conditions are met: ■ assertXPath is only invoked with an XPath expression of . Any other XPath expression will result in an RLIllegalArgumentException. ■ XLink facts should not be used in rule conditions as the XLink facts will not be asserted. 12-4 Oracle Fusion Middleware Performance and Tuning Guide 13 Oracle BPEL Process Manager Performance Tuning 13-1 13 Oracle BPEL Process Manager Performance Tuning Oracle Business Process Execution Language BPEL Process Manager provides several property settings that can be configured to optimize performance at the composite, fabric, application and server levels. This chapter describes these property settings and provides recommendations on how to use them. This chapter contains the following sections: ■ Section 13.1, About BPEL Process Manager ■ Section 13.2, Basic Tuning Considerations ■ Section 13.3, BPEL Properties Set Inside a Composite ■ Section 13.4, Tables Impacted By Instance Data Growth

13.1 About BPEL Process Manager

BPEL is the standard for assembling a set of discrete services into an end-to-end process flow, radically reducing the cost and complexity of process integration initiatives. Oracle BPEL Process Manager offers a comprehensive and easy-to-use infrastructure for creating, deploying and managing BPEL business processes. For more information, see Configuring BPEL Process Service Components and Engines in Oracle Fusion Middleware Administrators Guide for Oracle SOA Suite and Using the BPEL Process Service Component in Oracle Fusion Middleware Developers Guide for Oracle SOA Suite.

13.2 Basic Tuning Considerations

This section describes the basic BPEL Process Manager performance tuning properties that are configured either through WLST or Oracle Enterprise Manager. To modify properties through WLST, see Section 11.3, Modifying SOA Configuration Parameters . Note: The configuration examples and recommended settings described in this chapter are for illustrative purposes only. Consult your own use case scenarios to determine which configuration options can provide performance improvements. 13-2 Oracle Fusion Middleware Performance and Tuning Guide

13.2.1 BPEL Threading Model

When the dispatcher must schedule a dispatch message for execution, it can enqueue the message into a thread pool. Each dispatch set can contain a thread pool java.util.concurrent.ThreadPoolExecutor. The BPEL thread pool implementation notifies the threads when a message has been enqueued and ensures the appropriate number of threads are instantiated in the pool. The following thread properties can be tuned: ■ Dispatcher Invoke Threads ■ Dispatcher Engine Threads ■ Dispatcher System Threads ■ Dispatcher Maximum Request Depth

13.2.1.1 Dispatcher Invoke Threads

The dspInvokeThreads property specifies the total number of threads allocated to process invocation dispatcher messages. Invocation dispatcher messages are generated for each payload received and are meant to instantiate a new instance. If the majority of requests processed by the engine are instance invocations as opposed to instance callbacks, greater performance may be achieved by increasing the number of invocation threads. Higher thread counts may cause greater CPU utilization due to higher context switching costs. The minimum number of threads for this thread pool is 1 and it cannot be set to 0 a or negative number. The default value is 20 threads. Any value less than 1 thread is changed to the default.

13.2.1.2 Dispatcher Engine Threads

The dspEngineThreads property specifies the total number of threads allocated to process engine dispatcher messages. Engine dispatcher messages are generated whenever an activity must be processed asynchronously. If the majority of processes deployed are durable with a large number of dehydration points mid-process receive, onMessage, onAlarm, and wait activities, greater performance may be achieved by increasing the number of engine threads. Note that higher thread counts can cause greater CPU utilization due to higher context switching costs. The minimum number of threads for this thread pool is 1 and it cannot be set to 0 a or negative number. The default value is 30 threads. Any value less than 1 thread is changed to the default.

13.2.1.3 Dispatcher System Threads

The dspSystemThreads property specifies the total number of threads allocated to process system dispatcher messages. System dispatcher messages are general clean-up tasks that are typically processed quickly by the server for example, releasing stateful message beans back to the pool. Typically, only a small number of threads are required to handle the number of system dispatch messages generated during run time. Note: dspMinThreads, dspMaxThreads and dspInvokeAllocRatio configuration properties are deprecated in Oracle 11g. In addition, the invoke threads have their own pool in Oracle 11g so the dspInvokeAllocRatio is no longer required.