Number of Threads Oracle Fusion Middleware Online Documentation Library

21-4 Oracle Fusion Middleware Performance and Tuning Guide 100. This can be increased to a desired value provided there is sufficient memory for runtime data processing for large number of proxy services. This property value can be set in the setDomainEnv.sh file as an extra java argument as follows: -Dcom.bea.wli.sb.pipeline.RouterRuntimeCache.size={size} Example: EXTRA_JAVA_PROPERTIES=-Dcom.bea.wli.sb.pipeline.RouterRuntimeCache.size=3000 {EXTRA_JAVA_PROPERTIES}

21.4 Transport Tuning WLS and OSB

Latency and throughput of poller based transports depends on the frequency with which a source is polled and the number of files and messages read per polling sweep. The following are the main transport configurations to tune:

21.4.1 Polling Interval

Consider using a smaller polling interval for high throughput scenarios where the message size is not very large and the CPU is not saturated. The primary polling interval defaults are listed below with links to additional information:

21.4.2 Read Limit

The read limit determines the number of files or messages that are read per polling sweep. This defaults to 10 for the File and FTP transports. It can be set to 0 to specify no limit. Set this value to the desired concurrency. For more information, see File Transport Configuration Page in the Oracle Fusion Middleware Administrators Guide for Oracle Service Bus. Polling Intervals Default Interval Additional Information File Transport 60 seconds File Transport Configuration Page in the Oracle Fusion Middleware Administrators Guide for Oracle Service Bus FTP Transports 60 seconds FTP Transport Configuration Page in the Oracle Fusion Middleware Administrators Guide for Oracle Service Bus MQ Transport 1000 milliseconds MQ Transport Configuration Page in the Oracle Fusion Middleware Administrators Guide for Oracle Service Bus SFTP Transport 60 seconds SFTP Transport Configuration Page in the Oracle Fusion Middleware Administrators Guide for Oracle Service Bus JCA Transport 60 seconds JCA Transport Configuration Page in the Oracle Fusion Middleware Administrators Guide for Oracle Service Bus Oracle Service Bus Performance Tuning 21-5

21.5 Design Time Considerations for Proxy Applications

Consider the following design configurations for proxy applications based on your OSB usage and use case scenarios: ■ Avoid creating many OSB context variables that are used just once within another XQuery Context variables created using an Assign action are converted to XmlBeans and then reverted to the native XQuery format for the next XQuery. Multiple Assign actions can be collapsed into a single Assign action using a FLWOR expression. Intermediate values can be created using let statements. Avoiding redundant context variable creation eliminates overheads associated with internal data format conversions. This benefit has to be balanced against visibility of the code and reuse of the variables. ■ Transforming contents of a context variable such as body. Use a Replace action to complete the transformation in a single step. If the entire content of body is to be replaced, leave the XPath field blank and select Replace node contents. This is faster than pointing to the child node of body e.g. bodyOrder and selecting Replace entire node. Leaving the XPath field blank eliminates an extra XQuery evaluation. ■ Use body[1] to represent the contents of body as an input to a Transformation XQuery XSLT resource. OSB treats body[1] as a special XPath that can be evaluated without invoking the XQuery engine. This is faster than specifying an absolute path pointing to the child of body. A general XPath like bodyOrder must be evaluated by the XQuery engine before the primary transformation resource is executed. ■ Enable Streaming for pure Content-Based Routing scenarios. Read-only scenarios such as Content-Based Routing can derive better performance from enabling streaming. OSB leverages the partial parsing capabilities of the XQuery engine when streaming is used in conjunction with indexed XPaths. Thus, the payload is parsed and processed only to the field referred to in the XPath. Other than partial parsing, an additional benefit for read-only scenarios is that streaming eliminates the overhead associated with parsing and serialization of XmlBeans. The gains from streaming can be negated if the payload is accessed a large number of times for reading multiple fields. If all fields read are located in a single subsection of the XML document, a hybrid approach provides the best performance. See Section 21.6, Design Considerations for XQuery Tuning for additional details. The output of a transformation is stored in a compressed buffer format either in memory or on disk. Therefore, streaming should be avoided when running out of memory is not a concern. ■ Set the appropriate QOS level and transaction settings. Note: Setting the Read Limit to a high value and the Polling Interval to a small value may result in a large number of messages being simultaneously read into memory. This can lead to an OOM out-of-memory error if the message size is large.