You are on page 1of 49

Monitoring and Tuning

Oracle Fusion
Middleware and SOA
Suite 11g

Integration
Architecture

Matthias Furrer und Daniel Joray

TechEvent April 2013


BASEL

BERN

LAUSANNE

ZRICH

DSSELDORF

FRANKFURT A.M.

2013 Trivadis
Monitoring and Tuning Fusion Middleware 11g
April 2013

FREIBURG I.BR.

HAMBURG

MNCHEN

STUTTGART

WIEN

Introduction

Matthias Furrer
Long-standing experience in SOA and ERP Area
Architect, Consultant, Lead-Developer and Project Manager
SOA Certified Professional
Oracle SOA Blackbelt Consultant
Trainer with Trivadis Oracle Middleware und SOA
Reviewer of Technical Publications

More than 20 years of software development experience

Contact: matthias.furrer@trivadis.com

2013 Trivadis

Monitoring and Tuning Fusion Middleware 11g


April 2013

Agenda
Part I: Monitoring Oracle Fusion Middleware 11g
Manual Monitoring
Automated Monitoring

Part II: Tuning Oracle Fusion Middleware 11g


SOA Suite Infrastructure
SOA Suite Development
OSB Infrastructure
OSB Development

2013 Trivadis
Monitoring and Tuning Fusion Middleware 11g
April 2013

Manual Monitoring
WebLogic Logging - Overview

Each WebLogic Server instance writes all messages from its


subsystems and applications to a server log file that is located on the
local host computer. The default location for server logs is
DOMAIN_HOME\servers\SERVER_NAME\logs\SERVER_NAME.log

Each server instance forwards a subset of its messages to a domainwide log file. By default, only messages with a severity level of
NOTICE or higher are forwarded. The default location for domain
logs is
DOMAIN_HOME\servers\ADMIN_SERVER_NAME\logs\DOMAIN_NAME.log

The Node Manager writes start-up and status messages to


FMW_HOME\common\nodemanger\nodemanager.log

Detailed Information can be found in Oracle Configuring Log Files and Filtering
Log Messages for Oracle WebLogic Server (E13739).
4

2013 Trivadis
Monitoring and Tuning Fusion Middleware 11g
April 2013

Manual Monitoring
WebLogic Logging stdout and stderr

In addition to writing messages to a log file, each server instance


prints a subset of its messages to standard out. If not redirected,
standard out is the shell (command prompt) in which the server
instance is running.

By default, a server instance prints only messages of a NOTICE


severity level or higher to standard out

If Node Manager is used to start a Server, the messages that would


otherwise be output to stdout or stderr when starting a Managed
Server are instead displayed in the Administration Console and written
to a single log file for that server instance,
DOMAIN_HOME\servers\SERVER_NAME\logs\SERVER_NAME.out

Log rotation cannot be set-up for the .out files, on UNIX systems operating
system commands can be used for this.
5

2013 Trivadis
Monitoring and Tuning Fusion Middleware 11g
April 2013

Manual Monitoring
Fusion Middleware Logging - Overview

In addition to the WebLogic log files, Oracle Fusion Middleware


components write diagnostic log files in the Oracle Diagnostic
Logging (ODL) format. Log file naming and the format of the
contents of log files conforms to an Oracle standard and, by default,
the diagnostic messages are written in text format.

The default location for SOA Suite diagnostic logs is


DOMAIN_NAME\servers\SERVER_NAME\logs\SERVER_NAME-diagnostic.log

You can view log files using Fusion Middleware Control or the WLST
displayLogs command, or you can download log files to your
local client and view them using another tool

2013 Trivadis
Monitoring and Tuning Fusion Middleware 11g
April 2013

Manual Monitoring
Configuring FMW (Diagnostic) Log Files
You can configure the server log file Fusion Middleware Control under the SOA
Infrastructure -> Log Configuration Menu
Typically you adjust settings about file names, rotation, file retention here after
initial installation

2013 Trivadis
Monitoring and Tuning Fusion Middleware 11g
April 2013

Manual Monitoring
Configuring FMW (Diagnostic) Log Files Log Levels
There are two types of loggers: Persistent loggers and Runtime loggers

Run-time loggers are


loggers that are
currently active.
Changing the log level
will not require a restart
of the component.

Persistent loggers are


loggers that are saved
in a configuration file
and log levels of these
loggers are persistent
across component
restarts.

2013 Trivadis
Monitoring and Tuning Fusion Middleware 11g
April 2013

Manual Monitoring
Selective Tracing

The purpose of Selective Tracing is to allow for finer grained control of


logging, thereby limiting the information logged to only that which is
needed.

Selective Tracing allows for increasing the trace level in a domain for a
specified subset of activity and for a specified duration in minutes.

Tracing sessions can be started and stopped from either Fusion Middleware
Control or WLST.

Several of the Selective Tracing options are applicable to SOA and one,
Composite Name, is specifically for SOA.

Selective Tracing is of particular benefit when trying to troubleshoot


production issues and the overhead of logging needs to be kept to a
minimum.

2013 Trivadis
Monitoring and Tuning Fusion Middleware 11g
April 2013

Manual Monitoring
Selective Tracing - Configuration
You can configure Selective Tracing from the WebLogic Domain Menu
under Logs -> Selective Tracing

10

2013 Trivadis
Monitoring and Tuning Fusion Middleware 11g
April 2013

Manual Monitoring
Overview available Utilities
Monitoring SOA Suite Infrastructure
Many options are available to monitor SOA Suite Infrastructure,
WebLogic resources and SOA Suite Components. Among these,
there are :
WebLogic Administration Console
WebLogic Administration Console Monitoring Dashboard
Dynamic Monitoring Services - DMS Spy Servlet
.

11

2013 Trivadis
Monitoring and Tuning Fusion Middleware 11g
April 2013

Monitoring Utilities
WebLogic Administration Console
Monitoring WebLogic Components and Resources
Among others you can monitor the following in WebLogic
Administration Console:

12

Administration and Managed Servers


Subsystem Health (Applications and Adapters)
JVM Performance
Thread Activity
Workload
Security
JMS (Java Message Service)
JDBC Datasources
JTA (Java Transaction API)
2013 Trivadis
Monitoring and Tuning Fusion Middleware 11g
April 2013

Monitoring Utilities
Dynamic Monitoring Service (DMS)
The Oracle Dynamic Monitoring Service (DMS) enables Oracle Fusion
Middleware components to provide administration tools, such as Oracle
Enterprise Manager, with data regarding the component's performance, state
and on-going behaviour. Fusion Middleware Components push data to DMS and
in turn DMS publishes that data through a range of different components..
DMS Spy Servlet
WLDF
WLST
JConsole (MBeans)

13

2013 Trivadis
Monitoring and Tuning Fusion Middleware 11g
April 2013

Monitoring Utilities
DMS Spy Servlet
The Monitoring Dashboard is available under the URL:
http(s)://<fmwhost>:<soaport>/dms/Spy
You can also monitor your DMS collected metrics here

14

2013 Trivadis
Monitoring and Tuning Fusion Middleware 11g
April 2013

Monitoring Utilities
Administration Console Monitoring Dashboard
The Monitoring Dashboard provides views and tools for graphically presenting
diagnostic data about servers and applications running on them. The underlying
functionality for generating, retrieving, and persisting diagnostic data is provided
by the WebLogic Diagnostics Framework. The Monitoring Dashboard provides
additional tools for presenting that data in charts and graphs.
Built-In Views
Custom Views
Metrics Browser
Charts

15

2013 Trivadis
Monitoring and Tuning Fusion Middleware 11g
April 2013

Monitoring Utilities
Monitoring Dashboard
The Monitoring Dashboard is available under the URL:
http(s)://<fmwhost>:<adminport>/console/dashboard
You can create your own views using the metrics browser for your SOA
Composites

16

2013 Trivadis
Monitoring and Tuning Fusion Middleware 11g
April 2013

Automated Monitoring
Overview
Automating Monitoring
In order to automating monitoring of your infrastructure and SOA
composites with agents or scripting, the options include :
WebLogic Diagnostics Framework (WLDF)
WebLogic ScriptingTool (WLST)
Java Admin Utility
SOA Management Packs
Oracle Business Activity Monitoring (BAM)

17

2013 Trivadis
Monitoring and Tuning Fusion Middleware 11g
April 2013

Automated Monitoring
WebLogic Diagnostic Framework (WLDF)
The WebLogic Diagnostics Framework (WLDF) is a monitoring and diagnostic
framework that defines and implements a set of services that run within
WebLogic Server processes and participate in the standard server life cycle.
Monitoring Dashboard
Notifications
Metrics
SMTP, SNMP, JMX
and JMS

18

2013 Trivadis
Monitoring and Tuning Fusion Middleware 11g
April 2013

Automated Monitoring and Alerting


WLDF Setting up Diagnostic Module

19

Automated Monitoring and Alerting


1.

Creating a new Mail Session , which enables applications to access a pre-configured


javax.mail.Session object through JNDI.
The Mail Session can be used for the Notification. Other options include : SNMP, JMS

2.

Creating a new Notification


The Notification will be triggered by the Watch.

3.

Use the Dashboard or the DMS Spy Servlet application to find the metrics and
attributes that needs to be monitored

4.

Creating a new Watch


The Watch will use the defined DMS metrics to monitor system state in the Diagnostic
Framework.

2013 Trivadis
Monitoring and Tuning Fusion Middleware 11g
April 2013

Automated Monitoring and Alerting


WLDF Use Dashboards to find Metrics and Attributes
In order to find the relevant metrics and associated attributes, the easiest way is
to review the available metrics in the interactive applications:
http://<host>:<admin_port>/console/dashboard
http://<host>:<soa_port>/dms/Spy

The following DMS metrics groups are good candidates to monitor runtime
activity of SOA Suite composites:

The following DMS metrics groups are good candidates to monitor runtime
activity of JVM:

20

soainfra_component
soainfra_mediator_flow
soainfra_JCABinding
soa_infra_bpel_requests
soa_infra_bpel_activity

JRockit (MBean)
weblogic.management.runtime.JRockitRuntimeMBean
JVM
JVM_GC
JVM_ThreadStats
2013 Trivadis
Monitoring and Tuning Fusion Middleware 11g
April 2013

Automated Monitoring
WLST
Use can use WLST commands to view information about a specific performance
metric, a set of performance metrics, or all performance metrics for a particular
server or component.
DMS Metric Commands
Server Status

21

2013 Trivadis
Monitoring and Tuning Fusion Middleware 11g
April 2013

Automated Monitoring
Java Admin Utility
The weblogic.Admin utility can access the Administration Server as well as all
active server instances directly. If the Administration Server is down, you can still
use the weblogic.Admin utility to retrieve runtime information from Managed
Servers and invoke administrative commands.
Java Management Extensions (JMX)
Usable from command line or Java Class
while(mbeanIterator.hasNext()) {
serverRuntime = (ServerRuntimeMBean)mbeanIterator.next();
if(serverRuntime.getState().equals(ServerStates.RUNNING)){
serverRuntime.shutdown();
}

22

2013 Trivadis
Monitoring and Tuning Fusion Middleware 11g
April 2013

Automated Monitoring
Java Admin Utility Command Line
While the Administration Console interacts only with the Administration Server,
the weblogic.Admin utility can access the Administration Server as well as
all active server instances directly..

23

2013 Trivadis
Monitoring and Tuning Fusion Middleware 11g
April 2013

Automated Monitoring
SOA Management Packs
The Oracle SOA Management Pack Enterprise Edition delivers comprehensive
management capabilities for a Service-Oriented Architecture-based (SOA)
environment.
Centralized Management Console
Infrastructure Management
Configuration Management
Deployment Automation
Adapter Metrics
Service Level Management
Business Transaction Management

24

2013 Trivadis
Monitoring and Tuning Fusion Middleware 11g
April 2013

Automated Monitoring
SOA Management Packs
Based on Cloud Control /
Grid Control platform
Not included in SOA Suite
license
WebLogic Management
Packs also available

Source: Oracle Corp.


25

2013 Trivadis
Monitoring and Tuning Fusion Middleware 11g
April 2013

Automated Monitoring
Oracle Business Activity Monitoring (BAM)
The primary focus of Oracle Business Activity Monitoring (BAM) is to monitor
Business Transactions. However, due to its alerting capabilities it can also be
used to monitor composite instances.
Visualized dashboards of composite instances can be implemented
Alerting when abnormal situations occur
Deviation of expected results can be monitored
JCA BAM-Adapters can be used in BPEL, BPM and Oracle Service Bus
SOAP web service and JMS interface

26

2013 Trivadis
Monitoring and Tuning Fusion Middleware 11g
April 2013

Automated Monitoring
Oracle Business Activity Monitoring
Integrated component of Oracle SOA Suite
Included in SOA Suite license

27

2013 Trivadis
Monitoring and Tuning Fusion Middleware 11g
April 2013

Tuning
Top Performance Areas

Source: Oracle Corp.

To maximize the performance capabilities of the applications,


performance and scalability must be considered in environment
configuration and build into the design.
It is required to continuously monitor and track specific performance
issues within the application to understand where tuning can improve
performance
28

2013 Trivadis
Monitoring and Tuning Fusion Middleware 11g
April 2013

Configuration and Tuning


Top Performance Areas Environment
To maximize Oracle Fusion Middleware performance, it is required to
monitor, analyze, and tune all the components that are used by the
applications.

Hardware Resources

Operating System

Java Virtual Machine

Repository Database

WebLogic Server

Database Connections and Datasource Configuration

Service Engine Configuration

Logging Levels

29

2013 Trivadis
Monitoring and Tuning Fusion Middleware 11g
April 2013

Configuration
Environment and Deployment Architecture Considerations

Hardware

Clustering

Using the current software versions ensures avoidance of any issues that are already addressed
by patches that Oracle has released for issues encountered by other customers.

Auditing and Logging

30

If it is believed that there might be a need for a clustered. configuration eventually, consider
deploying into a cluster from day one, even if it is a cluster with only one node in it.

Versions

Sufficient resources.
Separate architectural components should be deployed into separate tiers the web servers,
application servers and database should be installed in different tiers, since they require different
tuning. If the WebCenter portal and content management components are being used, they
should also be installed on different machines

Use diagnostic logs only with caution and in development environments


Use Warning level and above in production environments
Be aware that Nodemanager stdout/stderr logs are not rotated

2013 Trivadis
Monitoring and Tuning Fusion Middleware 11g
April 2013

Configuration
Environment and Deployment Architecture Considerations

.ADF Applications
Use dedicated managed servers for ADF Applications such as Human Workflow and BPM
Workspaces if used frequently.

SSL Usage

Policy Store

The file-based policy store (system-jazn-data.xml) is not suitable for production


environments..
For production deployments Oracle highly recommended to use the database or OID for the
policy store.

Development Environments

31

Be aware that SSL encryption is coming with a significant CPU overhead.


Consider using SSL termination by hardware load balancers and using encryption only in DMZ

Admin Server-only domains should be used only in development environments.


Use Development Mode Domains only for development environments. Use Production Mode for
all other domains
Consider tuning JVM heap settings for JDeveloper in
ORACLE_HOME/jdeveloper/ide/bin/ide.conf
2013 Trivadis
Monitoring and Tuning Fusion Middleware 11g
April 2013

Tuning Java Virtual Machine


Heap Size and Garbage Collection Basic Recommendations
The goal of tuning your heap size is to minimize the time that your JVM
spends doing garbage collection while maximizing the number of clients
that the Fusion Middleware stack can handle at a given time.
Best practice is to tune the time spent doing garbage collection to within 5%
of execution time.
In production environments, set the minimum heap size and the maximum
heap size to the same value to prevent wasting virtual machine resources
used to constantly grow and shrink the heap.
Ensure that the sum of the maximum heap size of all the JVMs running on
your system does not exceed the amount of available physical RAM in order
to prevent the OS from paging.
Monitor low memory conditions by configuration in Administration Console
(Configuration -> Tuning).
32

2013 Trivadis
Monitoring and Tuning Fusion Middleware 11g
April 2013

Tuning Java Virtual Machine


SOA Suite Recommendations
Use 64-bit JVM for 64-bit platforms
By the use of UseCompressedOops, a reduction of memory usage by
something in the order of 10% can be expected. In Java SE 7,
UseCompressedOops is the default for 64-bit JVM processes when Xmx isn't
specified or is less than 32GB.
The recommended garbage collection setting for SOA/BPM is
UseParallelOldGC which will cause the JVM to use the Parallel Scavenger
collector in the young generation and the Parallel Old collector in the tenured
generation.
If running ADF applications (human task user interfaces) on the same
managed server as BPM is running on, use the concurrent garbage collector
UseConcMarkSweepGC.

33

2013 Trivadis
Monitoring and Tuning Fusion Middleware 11g
April 2013

Tuning JDBC Datasources


Applications obtain database connections using an application server
managed data source., which can be configured in WebLogic Server
Console.

Connection Pools
When configuring the data source, ensure that the connection pool has enough free
connections.

Statement Caching
Statement caching can eliminate potential performance impacts caused by repeated
cursor creation and repeated statement parsing and creation. Statement caching also
reduces the performance impact of communication between the application server and
the database server.

Initial Capacity
The initial capacity of physical database connections determines the number of
connections to be opened when the server is started. For frequently used databases it
is recommended to configure a higher value to avoid unnecessary open and close of
connections.

Connection Testing
Try to avoid unnecessary connection testing.

34

2013 Trivadis
Monitoring and Tuning Fusion Middleware 11g
April 2013

Tuning Dehydration Store


Hash Partitioning Tables (SOA Suite)
Consider using hash partitioning on your tables and indexes if your data does
not easily lend itself to range partitioning, but you would like to partition for
performance and manageability reasons. Hash partitioning provides a method of
evenly distributing data across a specified number of partitions. Rows are
mapped into partitions based on a hash value of the partitioning key.
To improve performance, consider using hash partitioning on the following
tables:
Partitioned Table Name
AUDIT_COUNTER
CUBE_INSTANCE

Partition Type
Hash partitioning of AC_PK index
Partitioned and Reverse key index
CI_CREATION_DATE
CUBE_SCOPE
Partition by hash (CIKEY)
MEDIATOR_CASE_INSTANCE Partition by hash ("ID")
XML_DOCUMENT
Partition by hash (document_id)

35

2013 Trivadis
Monitoring and Tuning Fusion Middleware 11g
April 2013

Number
Not Applicable
Not Applicable
Partitions = 200
Partitions = 200
Partitions = 200

Tuning Dehydration Store


Hash Partitioning Indexes (SOA Suite)
Further, consider using hash partitioning on the following indexes:
Hash Partitioned Indexes

COMPOSITE_INSTANCE_CREATED

BRDECISIONINSTANCE_INDX3

MEDIATOR_INSTANCE_INDEX2

MEDIATOR_INSTANCE_INDEX5

MEDIATOR_INSTANCE_INDEX6

MEDIATOR_INSTANCE_INDEX1

MEDIATOR_INSTANCE_INDEX3

MEDIATOR_CASE_INSTANCE_INDEX2

MEDIATOR_CASE_DETAIL_INDEX1

REFERENCE_INSTANCE_CO_ID

CI_NAME_REV_STATE

DOC_DLV_MSG_GUID_INDEX

STATE_TYPE_DATE

36

2013 Trivadis
Monitoring and Tuning Fusion Middleware 11g
April 2013

Tuning SOA Service Engines


General Considerations

.Stop unnecessary Components


Consider stopping if not used:

worklistapp

composer

b2bui

OracleAppsAdapter

OracleAq Adapter

MQSeriesAdapter

OracleBAMAdapter

. Disable DBMS job to refresh B2B Materialized View


If B2B is not being used, disable the DBMS job that refreshes the B2B materialized view. This job
runs every minute by default. Look for
dbms_refresh.refresh('"DEV_SOAINFRA"."B2B_SYSTEM_MV"') in dba_jobs.

. Purge Repository Database regularly

37

Purge instances of SCA processes regularly using the date-based purge scripts or partitioning.

2013 Trivadis
Monitoring and Tuning Fusion Middleware 11g
April 2013

Tuning SOA Service Engines


SOA Infrastructure Settings

Audit Level
Level of message tracking infrastructure to be collected by the infrastructure . This information is
collected in repository database. Should not be set to Development if not needed.

Logging Level
The default logging level is "NOTIFICATION". For production environments, consider using the
lowest acceptable logging level, such as "ERROR" or "WARNING" whenever possible.

Property CompositeInstanceStateEnabled
This option enables separate tracking of the running instances. All instances are captured as
either running or not running and should not be enabled in production environments.

Property instanceTrackingAuditTrailThreshold
This parameter is used to limit the audit trail size while it is being built. The default value is 1MB.
This parameter can improve performance, as it prevents huge audit trails to potentially consume a
lot or all the memory.

Property AuditKeyExtends (BPM)


The default block size is 1000. If there are more than 200 instances created per minute, consider
increasing the size of the block.

38

2013 Trivadis
Monitoring and Tuning Fusion Middleware 11g
April 2013

Tuning SOA Service Engines


BPEL / BPM Basic Tuning
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

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..

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.

Higher Settings will allow for more concurrency ( but will increase JVM heap
utilization)
39

2013 Trivadis
Monitoring and Tuning Fusion Middleware 11g
April 2013

Tuning SOA Service Engines


BPEL / BPM Basic Tuning Database persistence property
Value

Description

async.persist (Default)

Delivery messages are persisted in the database. With this setting,


reliability is obtained with some performance impact on the database.
In some cases, overall system performance can be impacted.

async.cache

Incoming delivery messages are kept only in the in-memory cache. If


performance is preferred over reliability, this setting should be
considered.
CAUTION: If you set the oneWayDeliveryPolicy
property to async.cache and your system fails, you may lose
messages.

sync

Directs Oracle BPEL Server to bypass the scheduling of


messages in the invoke queue, and invokes the BPEL
instance synchronously. In some cases this setting can improve
database performance.

The oneWayDeliveryPolicy applies to asynchronous processes only and can be


defined by the developer in the composite or on global level.
40

2013 Trivadis
Monitoring and Tuning Fusion Middleware 11g
April 2013

Tuning SOA Service Engines


Mediator Basic Tuning

Metrics Level
This property controls DMS metrics tracking level. By default, DMS metrics collections is enabled. If
you do not need to collect DMS metrics data, consider setting the metricsLevel to Disabled to
improve performance.

Concurrency (parallel routing rules only)

DeferredWorkerThreadCount specifies the number of deferred dispatchers for processing


messages in parallel. For higher loads consider increasing this parameter to have more number
of outbound threads for deferred processing as each parallel rule is processed by one of the
DeferredWorkerThreads. Default Value is 4 Threads.

When Mediator routing rule type is set to 'Parallel', DeferredMaxRowsRetrieved sets the
number of maximum rows (maximum number of messages for parallel routing rule processing)
that are retrieved from Mediator store table (which stores messages for parallel routing rule for
processing.) Default Value is 200 rows.

Audit Level
Configure only the minimum required audit level for the respective environment.

41

2013 Trivadis
Monitoring and Tuning Fusion Middleware 11g
April 2013

Application Design Considerations


SOA Applications (SOA Suite BPEL/BPMN) *)

Process Complexity
As a general rule of thumb, it is not desirable to have a BPEL process with more than one hundred
activities in it or a BPMN process with more than about fifty activities.
Consider breaking the process down into smaller sub-processes in order to control the amount of
memory required to maintain state and variables.

Synchronous vs. Asynchronous Processes


Synchronous processes should never have:
Mid-process breakpoint activities (e.g. receive, onMessage Alarm, Wait)
A non-idempotent (i.e. non-retriable) invoke
A non-blocking (i.e. parallel) invoke
Explicit dehydration, i.e. the checkpoint activity
The presence of any of these in a synchronous process will cause the engine to treat the process
the same way as an asynchronous process and dehydrate (and time-out can occur as well)
While async processes will attract dehydration, they can easier be load-balanced across nodes in a
cluster on the other hand.
Consider to disable audit instance tracking for sync processes if business requirements allow to
do so.
*) Source: Oracle , March 2013, Performance Tuning for Oracle Business Process Management Suite 11g
42

2013 Trivadis
Monitoring and Tuning Fusion Middleware 11g
April 2013

Application Design Considerations


SOA Applications (SOA Suite BPEL/BPMN) *)

Anti-pattern: Synchronous fault-handling


Faults should always be handled asynchronously, if fault handling logic is rather complex, so that the
resources that the engine is using to run the process can be released immediately..
Consider adding an asynchronous point like a JMS queue between failing logic and fault
handling.

Use of Loops
Avoid extensive use of loops. Use of large loops (i.e. more then ten activities in them) tends to
perform poorly with large number of instances or large variables.
Use of large loops can require the engine too keep large data objects in the JVM heap and perform a
large number of database transactions for dehydration of state and could lead to garbage collection
bottlenecks.
Consider using de-batching strategies for handling large payloads and to control the number of
records handled in a transaction.

Translate (XSLT) or Assign


Always use assign activity for simple data transformation. The use of transformations should be
reserved when large number of fields need to be transformed or more complicated logic needs to be
assigned.
*) Source: Oracle , March 2013, Performance Tuning for Oracle Business Process Management Suite 11g
43

2013 Trivadis
Monitoring and Tuning Fusion Middleware 11g
April 2013

Application Design Considerations


SOA Applications (SOA Suite BPEL/BPMN) *)

Avoid empty elements in the payload


Passing empty elements can add a significant overhead both in terms of marshaling and in terms of
processing and data transformation logic.

Complex Decisions
If there is a need to make a complex decision, consider implementing the decision in the rules
engine rather than modeling a set of if/then logic in the process itself. Execution of complex logic in
the rules engine is much more efficient in terms of memory footprint, speed of execution and volume
of audit data generated.

Avoid Marshaling overhead


Consider co-locating components with other components will avoid network propagation delay and
will also avoid marshaling and un-marshaling the data as the engine is able to recognize and
optimize local calls.
Creating direct bindings for components will allow the engine to avoid unnecessary marshaling.
However, this may not necessarily improve overall performance and scalability.

*) Source: Oracle , March 2013, Performance Tuning for Oracle Business Process Management Suite 11g
44

2013 Trivadis
Monitoring and Tuning Fusion Middleware 11g
April 2013

Tuning OSB
Operational Settings

Monitoring
Enable Monitoring only if needed to reduce network traffic.

Tracing
Turn-on Tracing only if needed in order to avoid printing the entire message context including
headers and message body in the server logs.

Cache Tuning for Proxy Service run-time data


OSB caches proxy service runtime meta-data using a two-level LRU cache with static and dynamic
sections. The static section will never be garbage collected. The cache introduces a performance
tradeoff between memory consumption and compilation cost.
The number of proxy services in the static portion of the cache is 100 by default and can be tuned by
setting the value in in the setDomainEnv.sh file as an extra java argument as follows:
-Dcom.bea.wli.sb.pipeline.RouterRuntimeCache.size={size}
Note that caching proxy services may help throughput but could impact memory usage.

45

2013 Trivadis
Monitoring and Tuning Fusion Middleware 11g
April 2013

Application Design Considerations


Oracle Service Bus *)

Using Context Variables


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 FLOWR expression.
Intermediate values can be created using let statements.

Transforming Context Variables


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. $body/Order) and selecting "Replace entire node". Leaving
the XPath field blank eliminates an extra XQuery evaluation..

Payload as Input to Transformation


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.

*) Source: Oracle Fusion Middleware Performance and Tuning Guide 11g (E10108)
46

2013 Trivadis
Monitoring and Tuning Fusion Middleware 11g
April 2013

Application Design Considerations


Oracle Service Bus *)

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.

Appropriate QoS Level


Do not set XA or Exactly-Once unless the reliability level required is once and only once.
OSB can invoke a back end HTTP service asynchronously if the QOS is "Best-Effort". Asynchronous
invocation allows OSB to scale better with long running back-end services. It also allows Publish
over HTTP to be truly fire-and-forget.

XQuery Tuning

Avoid the use of double front slashes (//) in XPaths


Index XPaths where applicable
Extract frequently used XPaths of large documents and intermediary variables within a FLOWR
expression

*) Source: Oracle Fusion Middleware Performance and Tuning Guide 11g (E10108)
47

2013 Trivadis
Monitoring and Tuning Fusion Middleware 11g
April 2013

Tuning
Top Resources

Oracle Database Performance Tuning Guide 11g


(B28274)
Oracle Fusion Middleware Performance and Tuning for Oracle WebLogic
11g
(E13814)
Oracle Fusion Middleware Performance and Tuning Guide 11g
(E10108)
Performance Tuning for Oracle Business Process Management Suite 11g

48

2013 Trivadis
Monitoring and Tuning Fusion Middleware 11g
April 2013

Trivadis AG

Thank you.

Matthias Furrer & Daniel Joray


Europa-Strasse 5
CH-8152 Glattbrugg

www.trivadis.com

BASEL

49

BERN

LAUSANNE

ZRICH

DSSELDORF

FRANKFURT A.M.

2013 Trivadis
Monitoring and Tuning Fusion Middleware 11g
April 2013

FREIBURG I.BR.

HAMBURG

MNCHEN

STUTTGART

WIEN

You might also like