Tuning SOA 11g can be done in a few quick steps, this will tackle most common performance issues at infrastructure level. On the other hand, most performance issues are in the application (composite) self. If you design a bad application, the application will not perform well.
I did my tuning on the following subjects:
- JVM Memory
- JVM Garbage Collection
- Datasources
- Threads
- EJB
- Database
JVM Memory
Make sure you have set the minimal and maximal heap size the same size. The size should be at least 1024MB.
Make sure the maxpermsize parameter is set to at least 512MB. In most cases requests in the SOA world are relative small, this means you could shrink the size of the stack for one Java thread.
Example:
-server -Xms1280m -Xmx1280m -XX:MaxPermSize=512m -Xss128k
JVM Garbage Collection
Running your application server with one CPU, you would not expect enhanchments by setting garbage collection to parallel. On VMWare we saw some significant improvement when we set this option even the virtual machine has one CPU. I think it has to do with the hyper-visor and the ESX Server. Somehow the virtual machine benefits from the ESX environment.
Example:
-XX:-UseParallelGC -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+CMSIncrementalMode -XX:+CMSIncrementalPacing
JMX
Setting some JMX options will not improve the performance, but it gives you insight information on the Java VM. If you not using JROckit your could set the following options and use VisualVM to view the Java engine.
-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=7004 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false
http://orasoa.blogspot.com/2010/04/monitoring-your-soa-jvm.html
Otherwise your JRockit Mission Control to get more information out of your Java VM.
Data-sources
Using the correct settings for all the connections to your database is essential. The SOA Suite is using a lot of data-sources, while the OSB is using one data-source for the reports. Measure your connections to the database while running a load test on your environment. Based on these measurements you can predict the correct configuration.
The following table shows an example of the settings your should tune. Note that the values are based on my measurements on a particular system. These settings should be applied via the Weblogic Console or through Weblogic scripting.
Datasources | EDNDataSource | EDNLocalTxDataSource | mds-owsm | mds-soa | OraSDPMDataSource | SOADataSource | SOALocalTxDataSource |
Host | db-host | db-host | db-host | db-host | db-host | db-host | db-host |
Port | 1521 | 1521 | 1521 | 1521 | 1521 | 1521 | 1521 |
SID | orcl | orcl | orcl | orcl | orcl | orcl | orcl |
Type | XA | non-XA | non-XA | non-XA | non-XA | XA | non-XA |
Initial Capacity: | 1 | 1 | 1 | 1 | 1 | 2 | 2 |
Maximum Capacity: | 10 | 10 | 10 | 10 | 10 | 20 | 20 |
Capacity Increment: | 2 | 2 | 2 | 2 | 2 | 2 | 2 |
Statement Cache Size: | 10 | 10 | 10 | 10 | 10 | 10 | 10 |
Test Connections On Reserve | TRUE | TRUE | TRUE | TRUE | TRUE | TRUE | TRUE |
Test Frequency: | 180 | 180 | 180 | 180 | 180 | 180 | 180 |
Seconds to Trust an Idle Pool Connection: | 30 | 30 | 30 | 30 | 30 | 30 | 30 |
Shrink Frequency: | 300 | 300 | 300 | 300 | 300 | 300 | 300 |
Connection Creation Retry Frequency: | 30 | 30 | 30 | 30 | 30 | 30 | 30 |
Inactive Connection Timeout: | 30 | 30 | 30 | 30 | 30 | 30 | 30 |
Maximum Waiting for Connection: | 2147483647 | 2147483647 | 2147483647 | 2147483647 | 2147483647 | 2147483647 | 2147483647 |
Connection Reserve Timeout: | 30 | 30 | 30 | 30 | 30 | 30 | 30 |
Statement Timeout: | -1 | -1 | -1 | -1 | -1 | -1 | -1 |
Enviroment | |||||||
oracle.net.CONNECT_TIMEOUT | 100000 | 100000 | 100000 | 100000 | 100000 | 100000 | 100000 |
Set XA Transaction Timeout: | TRUE | TRUE | |||||
XA Transaction Timeout: | 0 | 0 | |||||
XA Retry Duration: | 300 | 300 | |||||
XA Retry Interval: | 60 | 60 |
Threads
Do not touch the default threading model of Weblogic, unless you known what your are doing. Weblogic is using an automated mechanism for tuning his own work. WebLogic Server prioritizes work and allocates threads based on an execution model that takes into the managed servers parameters and actual run-time statistics (performance and throughput).
Within the SOA Suite 11g, you can still tune the threads of the BPEL engine itself. Keep in meind that these thread will use a database connection from the pool. It is not said that the total number of BPEL threads results in the same amount of connection to the database. You can set these values via Oracle Enterprise manager
dspInvokeThread | 10 |
dspEngineThreads | 15 |
dspSystemThreads | 2 |
synMaxWaitTime | 150 |
EJB
The soa-infra application contains all the EJB objects that are responsible for SOA11g (BPEL, Workflow, BPM, Sensors, Mediators, etc..). Each of these EJB objects has his own time out. By default it is 300 seconds. When you have long running process, also known as not optimal designed and implemented SOA Composites ;-) , you could run into time-out errors that could slow down the whole SOA environment. Therefore your should design and implement efficicient and optimal composites.
To change the time-out of the EJB's, execute the following steps.
- Stop all the managed servers
- Apply the EJB time-out changes
- Start the managed servers
- Stop all the managed servers
- Undeploy the soa-infra application
- Activate changes
- Deploy the soa-infra application from $ORACLE_HOME/soa/applications/soa-infra-wls.ear, as 'soa-infra' and copy application to all servers in the cluster
- Activate changes
- Redeploy soa-infra application with configuration file (Plan.xml) with all the new EJB time-ou settings.
- Activate changes
- Start soa-infra applicatio to server all requests.
Plan.xml: <?xml version='1.0' encoding='UTF-8'?> <deployment-plan xmlns="http://xmlns.oracle.com/weblogic/deployment-plan" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.oracle.com/weblogic/deployment-plan http://xmlns.oracle.com/weblogic/deployment-plan/1.0/deployment-plan.xsd"> <application-name>applications</application-name> <variable-definition> <variable> <name>TransactionDescriptor_transTimeoutSeconds_BPELEngineBean</name> <value>1800</value> </variable> <variable> <name>TransactionDescriptor_transTimeoutSeconds_BPELDeliveryBean</name> <value>1800</value> </variable> <variable> <name>TransactionDescriptor_transTimeoutSeconds_BPELActivityManagerBean</name> <value>1800</value> </variable> <variable> <name>TransactionDescriptor_transTimeoutSeconds_BPELServerManagerBean</name> <value>1800</value> </variable> <variable> <name>TransactionDescriptor_transTimeoutSeconds_BPELProcessManagerBean</name> <value>1800</value> </variable> <variable> <name>TransactionDescriptor_transTimeoutSeconds_BPELInstanceManagerBean</name> <value>1800</value> </variable> <variable> <name>TransactionDescriptor_transTimeoutSeconds_BPELFinderBean</name> <value>1800</value> </variable> <variable> <name>TransactionDescriptor_transTimeoutSeconds_BPELDispatcherBean</name> <value>1800</value> </variable> <variable> <name>TransactionDescriptor_transTimeoutSeconds_BPELSensorValuesBean</name> <value>1800</value> </variable> </variable-definition> <module-override> <module-name>soa-infra-wls.ear</module-name> <module-type>ear</module-type> <module-descriptor external="false"> <root-element>weblogic-application</root-element> <uri>META-INF/weblogic-application.xml</uri> </module-descriptor> <module-descriptor external="false"> <root-element>application</root-element> <uri>META-INF/application.xml</uri> </module-descriptor> <module-descriptor external="true"> <root-element>wldf-resource</root-element> <uri>META-INF/weblogic-diagnostics.xml</uri> </module-descriptor> <module-descriptor external="true"> <root-element>persistence-configuration</root-element> <uri>bpel_persistence_weblogic.jar!/META-INF/persistence-configuration.xml</uri> </module-descriptor> <module-descriptor external="false"> <root-element>persistence</root-element> <uri>bpel_persistence_weblogic.jar!/META-INF/persistence.xml</uri> </module-descriptor> </module-override> <module-override> <module-name>ejb_ob_engine_wls.jar</module-name> <module-type>ejb</module-type> <module-descriptor external="false"> <root-element>weblogic-ejb-jar</root-element> <uri>META-INF/weblogic-ejb-jar.xml</uri> <variable-assignment> <name>TransactionDescriptor_transTimeoutSeconds_BPELEngineBean</name> <xpath>/weblogic-ejb-jar/weblogic-enterprise-bean/[ejb-name="BPELEngineBean"]/transaction-descriptor/trans-timeout-seconds</xpath> </variable-assignment> <variable-assignment> <name>TransactionDescriptor_transTimeoutSeconds_BPELDeliveryBean</name> <xpath>/weblogic-ejb-jar/weblogic-enterprise-bean/[ejb-name="BPELDeliveryBean"]/transaction-descriptor/trans-timeout-seconds</xpath> </variable-assignment> <variable-assignment> <name>TransactionDescriptor_transTimeoutSeconds_BPELActivityManagerBean</name> <xpath>/weblogic-ejb-jar/weblogic-enterprise-bean/[ejb-name="BPELActivityManagerBean"]/transaction-descriptor/trans-timeout-seconds</xpath> </variable-assignment> <variable-assignment> <name>TransactionDescriptor_transTimeoutSeconds_BPELServerManagerBean</name> <xpath>/weblogic-ejb-jar/weblogic-enterprise-bean/[ejb-name="BPELServerManagerBean"]/transaction-descriptor/trans-timeout-seconds</xpath> </variable-assignment> <variable-assignment> <name>TransactionDescriptor_transTimeoutSeconds_BPELProcessManagerBean</name> <xpath>/weblogic-ejb-jar/weblogic-enterprise-bean/[ejb-name="BPELProcessManagerBean"]/transaction-descriptor/trans-timeout-seconds</xpath> </variable-assignment> <variable-assignment> <name>TransactionDescriptor_transTimeoutSeconds_BPELInstanceManagerBean</name> <xpath>/weblogic-ejb-jar/weblogic-enterprise-bean/[ejb-name="BPELInstanceManagerBean"]/transaction-descriptor/trans-timeout-seconds</xpath> </variable-assignment> <variable-assignment> <name>TransactionDescriptor_transTimeoutSeconds_BPELFinderBean</name> <xpath>/weblogic-ejb-jar/weblogic-enterprise-bean/[ejb-name="BPELFinderBean"]/transaction-descriptor/trans-timeout-seconds</xpath> </variable-assignment> <variable-assignment> <name>TransactionDescriptor_transTimeoutSeconds_BPELDispatcherBean</name> <xpath>/weblogic-ejb-jar/weblogic-enterprise-bean/[ejb-name="BPELDispatcherBean"]/transaction-descriptor/trans-timeout-seconds</xpath> </variable-assignment> <variable-assignment> <name>TransactionDescriptor_transTimeoutSeconds_BPELSensorValuesBean</name> <xpath>/weblogic-ejb-jar/weblogic-enterprise-bean/[ejb-name="BPELSensorValuesBean"]/transaction-descriptor/trans-timeout-seconds</xpath> </variable-assignment> </module-descriptor> <module-descriptor external="false"> <root-element>ejb-jar</root-element> <uri>META-INF/ejb-jar.xml</uri> </module-descriptor> </module-override> <module-override> <module-name>fabric-ejb.jar</module-name> <module-type>ejb</module-type> <module-descriptor external="false"> <root-element>weblogic-ejb-jar</root-element> <uri>META-INF/weblogic-ejb-jar.xml</uri> </module-descriptor> <module-descriptor external="false"> <root-element>ejb-jar</root-element> <uri>META-INF/ejb-jar.xml</uri> </module-descriptor> </module-override> <module-override> <module-name>hw_services_wls_ejb.jar</module-name> <module-type>ejb</module-type> <module-descriptor external="false"> <root-element>weblogic-ejb-jar</root-element> <uri>META-INF/weblogic-ejb-jar.xml</uri> </module-descriptor> <module-descriptor external="false"> <root-element>ejb-jar</root-element> <uri>META-INF/ejb-jar.xml</uri> </module-descriptor> </module-override> <module-override> <module-name>sdpmessagingclient-ejb.jar</module-name> <module-type>ejb</module-type> <module-descriptor external="false"> <root-element>weblogic-ejb-jar</root-element> <uri>META-INF/weblogic-ejb-jar.xml</uri> </module-descriptor> <module-descriptor external="false"> <root-element>ejb-jar</root-element> <uri>META-INF/ejb-jar.xml</uri> </module-descriptor> </module-override> <module-override> <module-name>b2b_engine_wls.jar</module-name> <module-type>ejb</module-type> <module-descriptor external="false"> <root-element>weblogic-ejb-jar</root-element> <uri>META-INF/weblogic-ejb-jar.xml</uri> </module-descriptor> <module-descriptor external="false"> <root-element>ejb-jar</root-element> <uri>META-INF/ejb-jar.xml</uri> </module-descriptor> </module-override> <module-override> <module-name>fabric.war</module-name> <module-type>war</module-type> <module-descriptor external="false"> <root-element>weblogic-web-app</root-element> <uri>WEB-INF/weblogic.xml</uri> </module-descriptor> <module-descriptor external="false"> <root-element>web-app</root-element> <uri>WEB-INF/web.xml</uri> </module-descriptor> </module-override> <module-override> <module-name>hw_services.war</module-name> <module-type>war</module-type> <module-descriptor external="true"> <root-element>weblogic-web-app</root-element> <uri>WEB-INF/weblogic.xml</uri> <hash-code>1278926170529</hash-code> </module-descriptor> <module-descriptor external="false"> <root-element>web-app</root-element> <uri>WEB-INF/web.xml</uri> </module-descriptor> </module-override> <module-override> <module-name>taskservice.war</module-name> <module-type>war</module-type> <module-descriptor external="true"> <root-element>weblogic-web-app</root-element> <uri>WEB-INF/weblogic.xml</uri> <hash-code>1278926170530</hash-code> </module-descriptor> <module-descriptor external="false"> <root-element>web-app</root-element> <uri>WEB-INF/web.xml</uri> </module-descriptor> </module-override> <module-override> <module-name>taskmetadataservice.war</module-name> <module-type>war</module-type> <module-descriptor external="true"> <root-element>weblogic-web-app</root-element> <uri>WEB-INF/weblogic.xml</uri> <hash-code>1278926170531</hash-code> </module-descriptor> <module-descriptor external="false"> <root-element>web-app</root-element> <uri>WEB-INF/web.xml</uri> </module-descriptor> </module-override> <module-override> <module-name>taskqueryservice.war</module-name> <module-type>war</module-type> <module-descriptor external="true"> <root-element>weblogic-web-app</root-element> <uri>WEB-INF/weblogic.xml</uri> <hash-code>1278926170532</hash-code> </module-descriptor> <module-descriptor external="false"> <root-element>web-app</root-element> <uri>WEB-INF/web.xml</uri> </module-descriptor> </module-override> <module-override> <module-name>taskreportservice.war</module-name> <module-type>war</module-type> <module-descriptor external="true"> <root-element>weblogic-web-app</root-element> <uri>WEB-INF/weblogic.xml</uri> <hash-code>1278926170533</hash-code> </module-descriptor> <module-descriptor external="false"> <root-element>web-app</root-element> <uri>WEB-INF/web.xml</uri> </module-descriptor> </module-override> <module-override> <module-name>IdentityService.war</module-name> <module-type>war</module-type> <module-descriptor external="true"> <root-element>weblogic-web-app</root-element> <uri>WEB-INF/weblogic.xml</uri> <hash-code>1278926170533</hash-code> </module-descriptor> <module-descriptor external="false"> <root-element>web-app</root-element> <uri>WEB-INF/web.xml</uri> </module-descriptor> </module-override> <module-override> <module-name>usermetadataservice.war</module-name> <module-type>war</module-type> <module-descriptor external="true"> <root-element>weblogic-web-app</root-element> <uri>WEB-INF/weblogic.xml</uri> <hash-code>1278926170528</hash-code> </module-descriptor> <module-descriptor external="false"> <root-element>web-app</root-element> <uri>WEB-INF/web.xml</uri> </module-descriptor> </module-override> <module-override> <module-name>runtimeconfigservice.war</module-name> <module-type>war</module-type> <module-descriptor external="true"> <root-element>weblogic-web-app</root-element> <uri>WEB-INF/weblogic.xml</uri> <hash-code>1278926170527</hash-code> </module-descriptor> <module-descriptor external="false"> <root-element>web-app</root-element> <uri>WEB-INF/web.xml</uri> </module-descriptor> </module-override> <module-override> <module-name>taskevidenceservice.war</module-name> <module-type>war</module-type> <module-descriptor external="true"> <root-element>weblogic-web-app</root-element> <uri>WEB-INF/weblogic.xml</uri> <hash-code>1278926170526</hash-code> </module-descriptor> <module-descriptor external="false"> <root-element>web-app</root-element> <uri>WEB-INF/web.xml</uri> </module-descriptor> </module-override> <module-override> <module-name>compositemetadataservice.war</module-name> <module-type>war</module-type> <module-descriptor external="true"> <root-element>weblogic-web-app</root-element> <uri>WEB-INF/weblogic.xml</uri> <hash-code>1278926170525</hash-code> </module-descriptor> <module-descriptor external="false"> <root-element>web-app</root-element> <uri>WEB-INF/web.xml</uri> </module-descriptor> </module-override> <module-override> <module-name>b2bws.war</module-name> <module-type>war</module-type> <module-descriptor external="true"> <root-element>weblogic-web-app</root-element> <uri>WEB-INF/weblogic.xml</uri> <hash-code>1278926170524</hash-code> </module-descriptor> <module-descriptor external="false"> <root-element>web-app</root-element> <uri>WEB-INF/web.xml</uri> </module-descriptor> <module-descriptor external="false"> <root-element>weblogic-webservices</root-element> <uri>WEB-INF/weblogic-webservices.xml</uri> </module-descriptor> <module-descriptor external="false"> <root-element>webservices</root-element> <uri>WEB-INF/webservices.xml</uri> </module-descriptor> <module-descriptor external="true"> <root-element>webservice-policy-ref</root-element> <uri>WEB-INF/weblogic-webservices-policy.xml</uri> </module-descriptor> </module-override> <module-override> <module-name>b2b_starter_wls.war</module-name> <module-type>war</module-type> <module-descriptor external="true"> <root-element>weblogic-web-app</root-element> <uri>WEB-INF/weblogic.xml</uri> <hash-code>1278926170509</hash-code> </module-descriptor> <module-descriptor external="false"> <root-element>web-app</root-element> <uri>WEB-INF/web.xml</uri> </module-descriptor> </module-override> <module-override> <module-name>agmetadataservice.war</module-name> <module-type>war</module-type> <module-descriptor external="true"> <root-element>weblogic-web-app</root-element> <uri>WEB-INF/weblogic.xml</uri> <hash-code>1278926170508</hash-code> </module-descriptor> <module-descriptor external="false"> <root-element>web-app</root-element> <uri>WEB-INF/web.xml</uri> </module-descriptor> </module-override> <module-override> <module-name>agqueryservice.war</module-name> <module-type>war</module-type> <module-descriptor external="true"> <root-element>weblogic-web-app</root-element> <uri>WEB-INF/weblogic.xml</uri> <hash-code>1278926170499</hash-code> </module-descriptor> <module-descriptor external="false"> <root-element>web-app</root-element> <uri>WEB-INF/web.xml</uri> </module-descriptor> </module-override> <module-override> <module-name>agadminservice.war</module-name> <module-type>war</module-type> <module-descriptor external="true"> <root-element>weblogic-web-app</root-element> <uri>WEB-INF/weblogic.xml</uri> <hash-code>1278926170497</hash-code> </module-descriptor> <module-descriptor external="false"> <root-element>web-app</root-element> <uri>WEB-INF/web.xml</uri> </module-descriptor> </module-override> <config-root>/opt/weblogic/Oracle/Middleware/KIM_SOA/soa/applications/plan</config-root> </deployment-plan>Set the following time-out of the EJB's:
BPEL/EJB properties | Timeout |
BPELActivityManagerBean | 1800 |
BPELDeliveryBean | 1800 |
BPELDispatcherBean | 1800 |
BPELEngineBean | 1800 |
BPELFinderBean | 1800 |
BPELInstanceManagerBean | 1800 |
BPELProcessManagerBean | 1800 |
BPELSensorValuesBean | 1800 |
BPELServerManagerBean | 1800 |
Verify the the global transaction time out on all the managed servers is larger then the time out of the EJB. Set the global transaxtion time-out, JTA, to 3600.
Database
To tune the dabatase, make sure that you follow the requirements of the SOA Suite 11g, make sure you can create enough process and session to the database. The database must be tuned, so the it has enough memory for caching, PGA, SGA memory should be adequate.
Make sure your have the purging scripts place. And verify if you have added an index to the SOA dehydration tables.
References
- http://download.oracle.com/docs/cd/E14571_01/core.1111/e10108/toc.htm
- http://www.oracle.com/technetwork/java/hotspotfaq-138619.html
- http://java.sun.com/performance/reference/whitepapers/6_performance.html
- http://visualvm.java.net/
- http://javarevisited.blogspot.com/2011/04/garbage-collection-in-java.html
- http://orasoa.blogspot.com/2007/01/tuning-bpel-in-nutshell.html
- http://orasoa.blogspot.com/2010/04/monitoring-your-soa-jvm.html
- http://orasoa.blogspot.com/2009/10/tuning-bpel-and-weblogic-92.html
- http://orasoa.blogspot.com/2007/03/tuning-bpel-with-jvmstat.html
- http://orasoa.blogspot.com/2011/07/soa-11g-ps3ps4-significant-purging.html
- http://orasoa.blogspot.com/2011/07/purging-soa-suite-11g-extreme-edition.html
- http://orasoa.blogspot.com/2011/07/soa-suite-11g-aq-tuning-tip.html
- http://www.oracle.com/technetwork/middleware/jrockit/overview/index-090630.html
- http://download.oracle.com/docs/cd/E15523_01/web.1111/e13701/self_tuned.htm
- http://blogs.oracle.com/SOA/resource/Purging_Strategies_in_Oracle_SOA_Suite_11gR1_PS3.pdf