Upload
tushar
View
19
Download
3
Embed Size (px)
DESCRIPTION
Oracle BPEL Process Manger Performance Tuning
Citation preview
Oracle BPEL Process Manager Performance Tuning
Tushar [email protected]
Nov 2008
http://oracle-fusionmiddlware.blogspot.com/
Agenda
Overview Process Level Performance Setting Domain Level Performance Setting Tuning OC4J for BPEL Server Tuning JVM for BPEL Server Tuning Dehydration Database for BPEL Server Takeaways
Copyright Tushar Jain, 2008
-2-
Overview
Performance tuning is done at two levels
Domain Level Process Level Transient processes Durable processes One-way invocation Two-way invocation
Process Types
Invocation Types
Copyright Tushar Jain, 2008
-3-
Overview contd
Invocation TypesUseWSDL file definition
One-Way Invocation
Two-Way Invocation
Variable declarations in BPEL activities
...
Through-delivery service
The request is saved in the delivery service. The caller thread does not block until the message is delivered to the targeted instance.
The request is delivered into Oracle BPEL Server and the targeted BPEL instance. The caller thread is blocked until the response is ready.
Copyright Tushar Jain, 2008
-4-
Overview contd
Idempotent Activity
An activity that can be retried (e.g. an assign activity or an invoke activity). Oracle BPEL Server saves the instance after a nonidempotent activity.
In-Flight Database Storage JTA Transactions for Two-way Invocations
For two-way invocations, if the process being called is a transient process, Oracle BPEL Server honors the caller's Java Transaction API (JTA) transaction. If the process being called is a durable process, meaning an in-flight database save can be occurring, Oracle BPEL Server creates a new transaction.
Copyright Tushar Jain, 2008
-5-
Overview contd
BPEL Threading Model
Threading and Connection Pool Relationships
Copyright Tushar Jain, 2008
-6-
Process Level Performance Settings
Process level performance properties are set in the bpel.xml file. After modifying the settings the process must be redeployed for the new settings to take effect. Can also set these properties in the Deployment Descriptor Properties window of Oracle JDeveloper
Copyright Tushar Jain, 2008
-7-
Process Level Performance Settings contd
List of Properties
Tables Impacted By Instance Data Growth
completionPersistLevel completionPersistPolicy idempotent inMemoryOptimization nonBlockingInvoke
audit_details audit_trail cube_instance cube_scope dlv_message dlv_subscription document_ci_ref document_dlv_msg_ref invoke_message schema_md task work_item xml_document
Copyright Tushar Jain, 2008
-8-
Domain Level Performance Settings
Domain level performance properties are set in the SOA_Oracle_Home\bpel\domains\domain_name\confi g\domain.xml file. Modify these from Oracle BPEL Control under Manage BPEL Domain Configuration. Oracle BPEL Control checks the existing settings and any new settings entered, and validates them without requiring a restart. Can also set these properties directly but it requires BPEL Server restart
Copyright Tushar Jain, 2008
-9-
Domain Level Performance Settings contd
Properties which have no impact on performance tuning
cbCacheHighWatermark cbCacheLowWatermark cbCachePolicy cbCacheUnits instCacheUnits invCacheHighWatermark invCacheLowWatermark invCachePolicy invCacheUnits subCacheHighWatermark subCacheLowWatermark subCachePolicy subCacheUnits
txDatasourceJndidatasourceJndi bpelcClasspath
Copyright Tushar Jain, 2008
- 10 -
Domain Level Performance Settings contd
Properties which have impact on performance tuning
auditDetailThreshold auditLevel deliveryPersistPolicy - Do Not change from default. By Oracle dspAgentDelay dspInvokeAllocFactor dspMaxRequestDepth dspMaxThreads dspMinThreads expirationMaxRetry idempotentThreshold instanceKeyBlockSize instCacheHighWatermark - If you dont understand JVM issues, do not change instCacheLowWatermark - If you dont understand JVM issues, do not change instCachePolicy invokerQueueConnectionPoolMinSize largeDocumentThreshold minBPELWait optCacheOn optIdempotentRouting - Do Not change from default. By Oracle optSoapShortcut - Do Not change from default. By Oracle processCheckSecs relaxBpelAssignRules - Do Not change. It is depricated. By Oracle slowPerfThreshold statsLastN syncMaxWaitTime uddiLocation - Miniscule effect on performanance validateXML workerQueueConnectionPoolMinSize
Copyright Tushar Jain, 2008
- 11 -
Tuning OC4J for BPEL Server
Tuning JTA Transaction Timeout for Oracle BPEL Process Manager Oracle BPEL Server EJB Configuration
WorkerBean InvokerBean
Configuring Data Sources for Oracle BPEL
Copyright Tushar Jain, 2008
- 12 -
Tuning OC4J for BPEL Server contd
Tuning JTA Transaction Timeout for Oracle BPEL Process Manager
BPEL Server uses JTA. The transaction timeout value is set by default to 60000 milliseconds in the transaction-manager.xml file. The location of this file depends on the method by which you installed Oracle BPEL Process Manager:
Transaction rollback errors due to timeouts, especially when BPEL Server is under stress. The timeout can happen for many reasons:
For Oracle Application Server SOA installations, the file is located in SOA_Oracle_Home\j2ee\home\config. For Oracle BPEL Process Manager installations, the file is located in SOA_Oracle_Home\bpel\system\appserver\oc4j\j2ee\home\config.
Change this value according to your process. The following example sets the timeout to 120 seconds:
Insufficient resources (e.g., not enough database connections in the connection pool, the server thread waits for 60 seconds and displays a timeout error, and so on). Large document manipulation (e.g., database writes of very large documents can take longer than 60 seconds).
If your process invokes partners that take longer than the specified timeout threshold, call them using a one-way request or set the nonBlockingInvoke partner link property to true in the bpel.xml deployment descriptor file.
Copyright Tushar Jain, 2008
- 13 -
Tuning OC4J for BPEL Server contd
Oracle BPEL Server EJB Configuration
To increase performance, Oracle recommends removing the max-instances attribute for all of BPEL Server's EJBs in the orion-ejb-jar.xml file. This enables the application server to allocate more resources to heavily-used beans For the BPEL Process Manager for OracleAS Middle Tier installation type, this file is located in SOA_Oracle_Home\j2ee\home\applicationdeployments\orabpel\ejb_ob_engine.
Copyright Tushar Jain, 2008
- 14 -
Tuning OC4J for BPEL Server contd
Oracle BPEL Server EJB Configuration
WorkerBean
Oracle BPEL Server uses an MDB called WorkerBean to perform processing. so, it is important to allocate enough threads to this MDB. Otherwise, resource utilization is not optimal. The following code from the orion-ejb-jar.xml file shows an allocation of 80 threads. Note:
The sum of the InvokerBean and WorkerBean threads must be greater than or equal to the value specified for the dspMaxThreads domain property in BPEL Control under Manage BPEL Domain Configuration. If multiple domains configured , add the dspMaxThreads property for all domains and compare that sum to the MDB total thread count.
Copyright Tushar Jain, 2008
- 16 -
Tuning OC4J for BPEL Server contd
Configuring Data Sources for BPEL Server
BPEL Server obtains database connections using an application server JTA data source. BPEL Server by default is configured to use the Oracle Database Lite dehydration store. For stress testing and production, Oracle recommends that use Oracle Database 10g. Oracle Database Lite packaged with the default installation to ease the initial developer experience. For the Oracle BPEL Process Manager for OracleAS Middle Tier installation type, the data source entry is located in the SOA_Oracle_Home\j2ee\home\config\data-sources.xml file. Be aware of the following issues when configuring the BPEL Server data source entry..
For Oracle Database 10g, the data source must also use the thin driver. For the Oracle9i Database, Oracle Call Interface (OCI) performs slightly better. When database persistence is enabled, BPEL Server generally performs better with JDBC statement caching enabled using the num-cached-statements attribute. Statement caching eliminates overhead due to repeated cursor creation and repeated statement parsing and creation. Statement caching also reduces the overhead of communication between the application server and the database server.
When configuring the data source, ensure that the connection pool has enough free connections to serve Oracle BPEL Server. The connection pool size must be greater than or equal to the sum of the dspMaxThreads property value in BPEL Control. If you have configured multiple domains, add all dspMaxThreads property values and compare that value with the data source's max-connections value. The default max-connections value is unlimited.
Copyright Tushar Jain, 2008
- 17 -
Tuning JVM for BPEL Server
JVM parameters can have an impact BPEL Server performance. The major factors that impact performance relate to the heap size. The heap size controls the amount of memory the JVM uses. If your BPEL process instance runs on a dedicated host, set the heap size value as high as possible. Another important heap configuration is the garbage collector's generational settings. The garbage collector optimizes collection by classifying objects by how long they live. Most BPEL Server objects are short-lived; thus they live in the Eden space. Oracle recommends sizing the Eden space to be 60 to 70 percent of the total heap size. The JVM -Xmn setting startup option sets an explicit value for the Eden space size. Do the following to set this option:
Take the following steps to change JVM command line options:
Calculate the 60-70 percent value, based on the specified maximum heap size. Use the calculated value to set the JVM -Xmn command line parameter.
Navigate to the Home page for the OC4J instance. Click Administration. If necessary, expand the Properties section of the table by clicking the Expand icon. Then, click the Go to Task icon in the Server Properties row. In the Command Line Options area, modify or change the appropriate command line options in the Options table. Click Apply. Navigate to the Cluster Topology page, select the OC4J instance that you modified, and click Restart. On the Confirmation page, click Yes.
Copyright Tushar Jain, 2008
- 18 -
Tuning Dehydration Database for BPEL Server
BPEL Server performance is related to the dehydration store's capacity. Oracle recommends the following:
Parameter NameLOG_BUFFER
Sample Value1048576
SHARED_POOL_SIZE
400M
Moving the redo logs into a separate RAID 1+0 disk Increasing the size of each redo log file to a large value (for example, 1 GB) Creating a separate database tablespace for Oracle BPEL Server
JOB_QUEUE_PROCESSES
1
DB_CACHE_SIZE
1000M
DB_FILE_MULTIBLOCK_READ_COUNT
8
Database Parameters Impacting Oracle BPEL Process Manager Performance
UNDO_RETENTION
0
PROCESSES
300
SESSION_CACHED_CURSORS
100
Copyright Tushar Jain, 2008
- 19 -
Takeaways
BPEL Server can be tuned at two levels
Domain Level Process Level
Apart from BPEL Server following also play role in performance tuning
Application Server Dehydration Database JVM
Hardware and Network assets have their own say in performance tuning
Copyright Tushar Jain, 2008
- 20 -