Oracle SOA Suite Performance Tuning Cookbook Over 100 recipes to get the best performance from your Oracle SOA Suite 11g infrastructure Matt Brasier Nicholas Wright BIRMINGHAM - MUMBAI Oracle SOA Suite Performance Tuning Cookbook Copyright © 2013 Packt Publishing All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews. Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book. Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information. First published: July 2013 Production Reference: 1040713 Published by Packt Publishing Ltd. Livery Place 35 Livery Street Birmingham B3 2PB, UK. ISBN 978-1-84968-884-0 www.packtpub.com Cover Image by Abhishek Pandey ([email protected]) Credits Authors Project Coordinators Matt Brasier Abhishek Kori Nicholas Wright Wendell Palmer Reviewers Proofreaders Sandeep Phukan Elinor Perry Smith Sylvain GROSJEAN Stephen Silk Tumelo Mametsa Indexer Acquisition Editors Hemangini Bari Grant Mizen Graphics Antony Lowe Valentina D'silva Lead Technical Editor Abhinash Sahu Susmita Panda Production Coordinator Technical Editors Conidon Miranda Pushpak Poddar Cover Work Rikita Poojari Conidon Miranda Lubna Shaikh 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. About the Reviewers Sandeep Phukan has more than 9 years of experience in Integration Technologies and Java. Sandeep currently works as a Senior Consultant with Anatas Technology Services, Sydney, a leader in next generation Enterprise Architecture Solutions. Earlier, Sandeep worked as a Technical Lead for Nokia Siemens Network R&D, Bangalore, assisting on the integration of Next Generation Unified Convergent Billing Systems based on Oracle Fusion Middleware 11g. Prior to this, Sandeep worked with Oracle SSI, Bangalore as a Senior Consultant, where his key involvement was Oracle AIA for Communications (Telco PIP). During this period he travelled to several countries around the world, aiding customers in developing customizations for Oracle AIA artifacts. Sandeep is a certified Java Developer and has a keen interest in Low Bandwidth Transports and Distributed Algorithms. During his time at Oracle SSI, Sandeep was actively involved with the SSI Innovation Centre where he created a number of utility extensions to the Oracle SOA Suite. Sandeep also maintains an open source repository of several SOA utilities in the Google code repository http://code.google.com/p/soalabs/. Sandeep is also an avid researcher in the area of SOA Governance. He has published a number of papers in the Oracle Technology Network (OTN) on technology neutral Designtime Dependency analysis of SOA Artifacts. One of his inventions on this subject (Graph Based Designtime Dependency Analysis) has recently been accepted for a Patent in the US Patents and Trademarks Office (USPTO). I would like to thank my loving wife Aparupa for her patience during those late night researches, and my friends and colleagues at Anatas who were always there whenever I needed them. Sylvain GROSJEAN is a principal Oracle Fusion Middleware consultant currently working as a freelancer in France. Over the past 12 years, he collaborated with BEA, and then with Oracle Consulting as a solution architect and trainer helping multiple major French clients (Utilities, Transportation, Insurance, Healthcare, Telecom). His primary focus is on Oracle Service Bus, Oracle SOA Suite, Oracle BPM, and ADF. You can follow Sylvain through his own blog at http://sgrosjean.blogspot.com Tumelo Mametsa is an Oracle Fusion Middleware expert currently consulting on various projects in South Africa and other African countries. He has over 10 years of experience in the Electronics and IT fields, respectively, with increasing level of responsibility. He is currently providing senior leadership for solutions architecture, enterprise architecture, business process engineering efforts, including SOA and Open Source Solutions for Africom IT Solutions. His focus is on engineered systems using various technologies, primarily the Oracle Fusion Middleware Stack. He also provides training for Oracle on Oracle Fusion Middleware Products. To my extended, supportive, loving Mametsa family (Mpho, Stlaks, Tshepo, Nunu, Letsie, Gontse), thanks for always being there for me. Much love to my darling wife Tsakani and kids, Tumisa, and Seetja. You guys make everything worthwhile. Thanks to my partners at Africom IT Solutions, you are the best team to work with by far. Much appreciation to all my friends (the Zoo) for individually supporting me in your unique ways, without you guys I would not be able to expertly juggle so many balls. www.PacktPub.com Support files, eBooks, discount offers and more You might want to visit www.PacktPub.com for support files and downloads related to your book. Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at service@ packtpub.com for more details. At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks. TM http://PacktLib.PacktPub.com Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can access, read and search across Packt's entire library of books. Why Subscribe? f Fully searchable across every book published by Packt f Copy and paste, print and bookmark content f On demand and accessible via web browser Free Access for Packt account holders If you have an account with Packt at www.PacktPub.com, you can use this to access PacktLib today and view nine entirely free books. Simply use your login credentials for immediate access. Instant Updates on New Packt Books Get notified! Find out when new books are published by following @PacktEnterprise on Twitter, or the Packt Enterprise Facebook page. Table of Contents Preface 1 Chapter 1: Identifying Problems 5 Introduction 6 Identifying new size problems with jstat 7 Identifying permanent generation problems with jstat 9 Monitoring garbage collection with jstat 10 Identifying locking issues with jstack 12 Identifying performance problems with jstack 14 Identifying performance problems using VisualVM on HotSpot 16 Identifying performance problems using JRMC on JRockit 21 Using JRockit flight recorder to identify problems 24 Monitoring JDBC connections with the WebLogic console 28 Identifying slow-running database queries 32 Identifying slow-running components with the Enterprise Manager 33 Chapter 2: Monitoring Oracle SOA Suite 35 Introduction 36 Installing the Hyperic server 37 Installing Hyperic agents 42 Configuring Hyperic to monitor SOA Suite 11g 46 Monitoring the SOA Suite server availability 51 Monitoring the JVM memory usage 54 Monitoring the platform CPU usage 58 Monitoring the data source usage 60 Monitoring open sockets 63 Monitoring committed transactions 66 Configuring alerts in Hyperic 69 Monitoring the system using the DMS servlet 72