Oracle SOA Suite Performance Tuning Cookbook

Similar documents
Getting Started with Memcached. Ahmed Soliman

Oracle SOA Suite 11g: Build Composite Applications

Getting Started with Hazelcast

Reporting with Visual Studio and Crystal Reports

1Z Oracle Application Grid 11g Essentials Exam Summary Syllabus Questions

Oracle Exam 1z0-478 Oracle SOA Suite 11g Certified Implementation Specialist Version: 7.4 [ Total Questions: 75 ]

Oracle SOA Suite 11g: Build Composite Applications

White Paper. Major Performance Tuning Considerations for Weblogic Server

Oracle WebCenter 11g PS3 Administration Cookbook

Oracle SOA Suite 12c : Build Composite Applications

Oracle SOA Suite 12c: Build Composite Applications

1 Copyright 2011, Oracle and/or its affiliates. All rights reserved.

The Modern Mainframe At the Heart of Your Business

LabVIEW Graphical Programming Cookbook

Linux Utilities Cookbook

Oracle Bpel Process Manager Installation Guide 11g

Atlassian Confluence 5 Essentials

Oracle Data Integrator 12c: Integration and Administration

Oracle SOA Suite 12c: Build Composite Applications. About this course. Course type Essentials. Duration 5 Days

concrete5 Cookbook David Strack Chapter No. 2 "Working with Blocks"

Samsung SDS Enterprise Cloud

Vendor: Oracle. Exam Code: 1Z Exam Name: Oracle SOA Suite 12c Essentials. Version: Demo

Best Practices for Setting BIOS Parameters for Performance

IBM FileNet Content Manager 5.2. Asynchronous Event Processing Performance Tuning

Oracle Data Integrator 12c: Integration and Administration

Getting Started with ovirt 3.3

Oracle WebLogic Server 11g: Administration Essentials

Ext JS 4 Plugin and Extension Development

Axure RP Prototyping Cookbook

Web 2.0 Solutions with Oracle WebCenter 11g

1Z0-434 Exam Questions Demo Oracle. Exam Questions 1Z Oracle SOA Suite 12c Essentials

Deploying Liferay Digital Experience Platform in Amazon Web Services

Getting Started with Citrix VDI-in-a-Box

Visualforce Developer's Guide

Sage ACT! 2012 Cookbook

Citrix XenDesktop 5.6 Cookbook

Citric Access Gateway VPX Essentials

WebLogic JMS System Best Practices Daniel Joray Trivadis AG Bern

Oracle ADF Faces Cookbook

X100 ARCHITECTURE REFERENCES:

TUTORIAL: WHITE PAPER. VERITAS Indepth for the J2EE Platform PERFORMANCE MANAGEMENT FOR J2EE APPLICATIONS

Oracle WebLogic Server 12c: Administration I

CDW PARTNER REVIEW GUIDE SERVER VIRTUALIZATION

TestNg Beginner's Guide

VMware View Security Essentials

Desire2Learn for Higher Education Cookbook

phplist 2 Campaign Manager

1Z Oracle SOA Suite 12c Essentials Exam Summary Syllabus Questions

MuleSoft Certified Developer - Integration Professional Exam Preparation Guide

Apache CloudStack Cloud Computing

Diplomado Certificación

1 enterprise. Oracle BAM 11gR1 Handbook. Activity Monitoring. Your essential BAM sidekick for monitoring, alerting,

<Insert Picture Here> Forms Strategies: Modernizing Your Oracle Forms Investment

OIG 11G R2 PS1 Field Enablement Training

Cheat sheet: Data Processing Optimization - for Pharma Analysts & Statisticians

Best Practices for Testing SOA Suite 11g based systems

1Z0-560 Oracle Unified Business Process Management Suite 11g Essentials

Learning Android Canvas

Sync Services. Server Planning Guide. On-Premises

Getting Started with. Oracle SOA Suite 11g. R1 -AHands-On Tutorial. composite application in just hours!

Best Practices for Implementing a BI Strategy With SAS

Increasing Performance for PowerCenter Sessions that Use Partitions

Improve Web Application Performance with Zend Platform

Oracle WebLogic Server 12c Advanced Administration Cookbook By Dalton Iwazaki READ ONLINE

BlackBerry Enterprise Server for Microsoft Exchange

Goliath Technology Overview with MEDITECH Module

Scaling DreamFactory

Contract Information Management System (CIMS) Technical System Architecture

WebSphere Application Server, Version 5. What s New?

Presentation Abstract

IBM Cognos 10 Report Studio Cookbook Second Edition

Java Without the Jitter

Oracle Identity Manager 11g R2: Essentials

WebSphere 4.0 General Introduction

MSG: An Overview of a Messaging System for the Grid

Typical Issues with Middleware

Ebook : Overview of application development. All code from the application series books listed at:

Service Execution Platform WebOTX To Support Cloud Computing

WebLogic Server- Tips & Tricks for Troubleshooting Performance Issues. By: Abhay Kumar AST Corporation

From data center OS to Cloud architectures The future is Open Syed M Shaaf

Web Serving Architectures

Cloud + Big Data Putting it all Together

Migrating to the P8 5.2 Component Manager Framework

ORACLE ENTERPRISE MANAGER 10g ORACLE DIAGNOSTICS PACK FOR NON-ORACLE MIDDLEWARE

Oracle s JD Edwards EnterpriseOne IBM POWER7 performance characterization

Webcenter Application Performance Tuning guide

Free Downloads Java Servlet & JSP Cookbook

What every DBA needs to know about JDBC connection pools Bridging the language barrier between DBA and Middleware Administrators

Cassandra Design Patterns

vsan 6.6 Performance Improvements First Published On: Last Updated On:

OpenCms 7 Development

Best Practices. Deploying Optim Performance Manager in large scale environments. IBM Optim Performance Manager Extended Edition V4.1.0.

Sync Services. Server Planning Guide. On-Premises

Getting Started with OrientDB

... IBM AIX performance and tuning tips for Oracle s JD Edwards EnterpriseOne web server

Learning DHTMLX Suite UI

XBS Application Development Platform

2008 WebSphere System z Podcasts - Did you say Mainframe?

WebSphere. Virtual Enterprise Version Virtualization and WebSphere Virtual Enterprise Version 6.1.1

Hyper-V Network Virtualization Cookbook By Ryan Boud READ ONLINE

Transcription:

Oracle SOA Suite Performance Tuning Cookbook Matt Brasier Nicholas Wright Chapter No. 9 "Mediator and BAM"

In this package, you will find: A Biography of the authors of the book A preview chapter from the book, Chapter NO.9 "Mediator and BAM" A synopsis of the book s content Information on where to buy this book About the Authors Matt Brasier is a professional services consultant with 10 years of experience tuning Enterprise Java applications. He has 9 years of experience working with Enterprise Java middleware, and has always focused on the performance aspects of application servers and SOA platforms. Matt has spoken at numerous technical conferences, including The Serverside Java Symposium and JUDCon. Matt is the head of consulting at C2B2 Consulting Ltd., an independent middleware consultancy specializing in SOA and JEE, providing professional services on the leading Java middleware platforms. C2B2 is an Oracle Gold Partner with Application Grid Specialization. I would like to thank my partner, Caroline, and our dog, Minstrel, for their understanding while I was writing this book, my father for encouraging me at the start, and C2B2 for giving me the time and experience necessary to do it.

Nicholas Wright is a Java middleware consultant and technical evangelist with 9 years of experience from Embedded C real-time systems to Enterprise Java. He has served on a Java Community Process Expert Group, and spoken at conferences across the world. Nick is a senior consultant at C2B2 Consulting Ltd., where he works with a wide range of commercial and open source JEE and SOA middleware platforms. I would like to thank my family, friends, and colleagues for whom I have disappeared off the face of the Earth while working on this book. For your patience and understanding, I thank you. Mostly I must thank my partner, Kay Louise, for putting up with my continual slaving over a computer whenever I have any spare time, love you.

Oracle SOA Suite Performance Tuning Cookbook Oracle SOA Suite 11g forms the basis of the SOA infrastructure for many organizations. While there is a wealth of information on administering SOA Suite applications already available, there is very little independent information available regarding performance tuning. With the chief goal of software and hardware vendors being to sell more licenses and hardware, the topic of getting the most from your existing investment often falls by the wayside. This book aims to address that by giving clear, concise, and simple recipes that will help you identify performance bottlenecks in your application, and then resolve them. We work from the ground up, starting with how to identify common SOA Suite 11g performance problems and introducing the tools that you need, and working up the stack through JVM tuning and application server tuning, before covering the BPEL, BPMN, and mediator stacks. Finally, we have chapters on application design and deployment considerations. What This Book Covers Chapter 1, Identifying Problems, starts out by looking at some of the common performance problems that can occur in the Oracle SOA Suite applications, and how to identify them. We look at using a variety of tools to understand what is going on inside the JVM, and to identify the particular resource bottleneck that is causing poor performance. Chapter 2, Monitoring Oracle SOA Suite, looks at how we can use the VFabric Hyperic tool from VMWare to monitor the performance of our SOA Suite infrastructure, and what metrics we should be keeping an eye on. Chapter 3, Performance Testing, looks at using the Apache JMeter tool to solve performance problems, by triggering them. Chapter 4, JVM Memory, starts right at the bottom of the Oracle SOA Suite 11g stack. We look at how JVM memory is allocated, and how you can increase and decrease the memory available to your application, as well as other JVM tuning tips. The low-level areas of Oracle SOA Suite are often overlooked, so we cover the basics of Java memory management in enough detail to give those unfamiliar with it sufficient background to understand what they need to be concerned about. Chapter 5, JVM Garbage Collection Tuning, teaches us how the Java virtual machine garbage collector does a very complicated job, and that there are a number of ways of optimizing it for the kinds of payloads that Oracle SOA Suite 11g usually has to handle.

Chapter 6, Platform Tuning, looks at some of the tuning options available in the operating system and Oracle WebLogic server that can improve the performance of SOA Suite 11g applications. Chapter 7, Datasources and JMS, covers tips related to JMS and Datasource tuning that can improve the performance of resource-intensive SOA Suite applications. Chapter 8, BPEL and BPMN Engine Tuning, primarily focuses on how we can improve the performance of the engine itself, including database tuning recipes, and helps those who find that the bottleneck of their SOA Suite system is the BPEL or BPMN application itself. Chapter 9, Mediator and BAM, focuses on tuning the Oracle SOA Suite Mediator, and also includes some information on tuning the BAM Adapter for SOA Suite application that connects to a BAM service. Chapter 10, Rules and Human Workflow, focuses on tuning the rules and humanworkflow components, and our recipes focus on how to reduce resource contention. Chapter 11, SOA Application Design, focuses on design-time recipes that will be of more interest to architects. We also discuss how design-time decisions can have an impact on the performance of a SOA Suite application, and covers best practices for designing the key components. Chapter 12, High Performance Configuration, takes a higher-level look at the Oracle SOA Suite-deployment architectures, focusing on how we can use cluster and load balance to scale our application out to meet performance requirements.

9 Mediator and BAM In this chapter, we will look at the following recipes: Setting Mediator Parallel Metrics Level Setting Mediator Parallel Worker Threads Setting Mediator Parallel Maximum Rows Retrieved Setting Parallel Locker Thread Sleep Using batched delivery in the BAM Adapter Introduction The Mediator engine and the Business Activity Monitoring (BAM) connector are used less frequently than the BPMN and BPEL engines, but there are still performance considerations when using these technologies. The Mediator engine is a relatively simple component, yet it works in quite a complex way, giving us only a few options for tuning it. These options are all focused on the execution of parallel routing rules, as sequential routing rules run on a single thread, and keep that thread until the rule has completed executing. Parallel rules, on the other hand, are executed by retrieving a list of requests from the database, and then processing each request using a set of worker threads. These threads allow the requests to be processed in parallel. The BAM Adapter does not have many properties that can be tuned, but we do look at one improvement here that can improve performance.

Mediator and BAM Setting Mediator Parallel Metrics Level If you make use of DMS (discussed in Chapter 2, Monitoring Oracle SOA Suite), then collecting the DMS metrics from the Mediator engine adds an unnecessary overhead. Getting ready You will need to know the administration credentials for your SOA Suite 11g domain, and the URL for the Enterprise Manager console. How to do it... To set the Parallel Metrics Level property, perform the following steps: 1. Log in to the Enterprise Manager. 2. Expand the SOA section in the left-hand pane, and right-click on soa-infra. 3. Now, select SOA Administration Mediator Properties. 248

Chapter 9 4. You will now see the SOA properties page. 5. Set the Metrics Level property to Disabled. How it works... By default, the Mediator engine will collect metrics from the execution of composite instances, and make them available via the DMS. If you do not make use of these metrics, then there is little point collecting them, and by removing them, performance can be improved. See also The Monitoring the system using the DMS servlet recipe in Chapter 2, Monitoring Oracle SOA Suite 249

Mediator and BAM Setting Mediator Parallel Worker Threads By increasing the number of parallel worker threads, environments with large workloads can process more requests at the same time. Getting ready For more details, refer to the Getting ready section of the Setting Mediator Parallel Routing Rules recipe. How to do it... To set the Parallel Worker Threads property, perform the following steps: 1. Follow the steps from 1 through 3 from the Setting Mediator Parallel Metrics Level recipe. 2. Set the property Parallel Worker Threads to a larger value, such as 10. How it works... The Parallel Worker Threads property determines the number of threads available for processing parallel routing rules. If you have many parallel routing rules defi ned in your application, then the default value of 4 may not be suffi cient; so you can increase the number of threads to allow more parallel rule requests to be processed concurrently. See also The Setting Parallel Locker Thread Sleep recipe The Setting Mediator Parallel Maximum Rows Retrieved recipe Setting Mediator Parallel Maximum Rows Retrieved By increasing the number of rows retrieved from the Mediator store table, performance can be improved in high demand systems. Getting ready For more details, refer to the Getting ready section of the Setting Mediator Parallel Metrics Level recipe. 250

Chapter 9 How to do it... The following steps will allow us to set the Parallel Maximum Rows Retrieved property: 1. Follow the steps from 1 through 3 from the Set Mediator Parallel Metrics Level recipe. 2. Set the property Parallel Maximum Rows Retrieved to a larger value, such as 500. How it works... The Parallel Maximum Rows Retrieved property determines how many rows are read from the Mediator store database when loading pending parallel rule execution requests. By loading more rows at a time, the number of trips to the database can be reduced, improving performance; however, this will only have an effect if there are usually multiple requests waiting to be processed. The default is 200 rows, so you will need to have a busy system with lots of parallel Mediator rules, in order to see any improvement from increasing this value. See also The Setting Parallel Locker Thread Sleep recipe The Setting Mediator Parallel Worker Threads recipe Setting Parallel Locker Thread Sleep By reducing the amount of time that the engine sleeps between checking for parallel composite instances that need executing, performance can be improved. Getting ready For more details, refer to the Getting ready section of the Setting Mediator Parallel Metrics Level recipe. How to do it... To set the Parallel Locker Thread Sleep time, perform the following steps: 1. Follow the steps from 1 through 3 from the Set Mediator Parallel Metrics Level recipe. 2. Set the Parallel Locker Thread Sleep property to 1. 251

Mediator and BAM How it works... While parallel routing rules do allow for truly asynchronous processing in the Mediator, the way that they are processed is not intuitive. A daemon thread is used to check the Mediator store database for requests to be processed, and checks each parallel rule in turn. If there are requests to be processed for a rule, then exactly one request will be processed for that rule using a Mediator worker thread. After it has checked all the parallel rules (and executed one request for each that has pending requests), the thread will sleep for a period of seconds defi ned by the Parallel Locker Thread Sleep time. By default this value is 2 seconds, but performance can be improved if you are using parallel routing rules by decreasing this to 1 second (the lowest value allowed). Note that the daemon thread does not execute the requests; it is just used to check which rules have pending requests, and assign them to worker threads. This seemingly strange approach is used to prevent a very busy parallel rule from hogging all of the worker threads, thus starving other rules of the threads they need, and potentially causing performance bottlenecks. See also The Setting Parallel Mediator Maximum Rows Retrieved recipe The Setting Mediator Parallel Worker Threads recipe Using batched delivery in the BAM Adapter By altering the batching settings for the BAM Adapter, you can make fewer calls out to the Active Data Cache Server, which can save bandwidth and improve performance. Getting ready This recipe is only useful if your domain makes use of the BAM Adapter. You will need write access to the fi les in your SOA Suite domain for this recipe. The confi guration fi les are not created until the server is fi rst started, so you will need to start the server before you are able to edit the fi les. 252

Chapter 9 How to do it... The following steps will help us enable batched delivery for the BAM Adapter: 1. Edit the following fi le: ORACLE_HOME/user_projects/domains/$DOMAIN_NAME/config/ fmwconfig/servers/bam_server1/applications/oracle-bam_11.1.1/ config/bamcommonconfig.xml 2. Locate the BAM batching properties at the top of the fi le, and increase their values. We suggest trying the following values: Property Default Value Tuned Value Batching_Limit_Lower 1000 2500 Batching_Limit_Upper 5000 10000 Batching_Timeout 50 100 3. Save the fi le, and restart your BAM server. How it works... The BAM Adapter sends data to the Active Data Cache server in batches. If you are making heavy use of the BAM Adapter in your SOA Suite application, you can improve performance by increasing the size of these batches. The three properties we tune here are the key ones used to determine the batch size. They can be explained as follows: Batching_Limit_Lower: It determines the minimum number of messages in the batch. Batching_Limit_Upper: It determines the maximum number of messages in the batch. Batching_Timeout: It determines how long we have to wait before sending the batch if we have not reached either of the other two limits. 253

Mediator and BAM There's more... The BAM Adapter batching system has retry logic built into it that will attempt to resend batches of messages if the Active Data Cache server is down, or some other failure occurs when sending a batch of messages. These properties can also be tweaked in order to confi gure this retry behavior, including changing the time between retries, and determining the number of pending batches before calls to the BAM Adapter start blocking. These properties are discussed in more detail in the Oracle BAM Adapter confi guration guide at http://docs.oracle.com/cd/e23943_01/admin.1111/e10226/bam_config. htm#soaag9931. As the retry logic is focused primarily on resilience rather than performance, we will not discuss it in detail here. 254

Where to buy this book You can buy Oracle SOA Suite Performance Tuning Cookbook from the Packt Publishing website: http://www.packtpub.com/oracle-soa-suite-11gperformance-tuning-cookbook/book. Free shipping to the US, UK, Europe and selected Asian countries. For more information, please read our shipping policy. Alternatively, you can buy the book from Amazon, BN.com, Computer Manuals and most internet book retailers. www.packtpub.com