BPM Performance
BPM Performance
IBM Business Process Manager (BPM) 7.5 Performance Tuning and Best Practices
ibm.com/redbooks
Redpaper
4784edno.fm
International Technical Support Organization IBM Business Process Management (BPM) V7.5 Performance Tuning January 2012
REDP-4784-00
4784edno.fm
Note: Before using this information and the product it supports, read the information in Notices on page vii.
Second Edition (January 2012) This edition applies to IBM Business Process Manager 7.5, Integration Designer 7.5, and Business Monitor 7.5. This document created or updated on January 27, 2012.
Copyright International Business Machines Corporation 2012. All rights reserved. Note to U.S. Government Users Restricted Rights -- Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
4784TOC.fm
Contents
Notices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii Trademarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viii Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix The team who wrote this paper . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi Now you can become a published author, too! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi Comments welcome. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi Stay connected to IBM Redbooks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xii Chapter 1. Architecture best practices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.1 Top tuning and deployment guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.2 Modeling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.2.1 Common Best Practices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.2.2 Process Designer Best Practices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.2.3 Integration Designer Best Practices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.3 Topology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 1.3.1 Deploy appropriate hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 1.3.2 Deploy local modules in the same server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 1.3.3 Best practices for clustering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 1.3.4 Evaluate service providers and external interfaces. . . . . . . . . . . . . . . . . . . . . . . . . 9 1.4 Business Space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 1.4.1 Optimize the Topology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 1.4.2 Use a Network with Low Latency and High Bandwidth . . . . . . . . . . . . . . . . . . . . 11 1.4.3 Use a High Performing Browser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 1.4.4 Enable Browser Caching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 1.4.5 Locate Servers Physically Near Clients . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 1.4.6 Use Modern Desktop Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 1.5 Large objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 1.5.1 Factors affecting large object size processing . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 1.5.2 Large object design patterns. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 1.6 64-bit considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 1.7 IBM Business Monitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 1.7.1 Event processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 1.7.2 Dashboard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 1.7.3 Database server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Chapter 2. Development best practices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.1 Shared Best Practices. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.1.1 Large object best practices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2 Process Designer Best Practices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2.1 Clear variables in taskless services in a coach. . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2.2 Dont use Multi Instance Loops (MILs) in the System Lane, or for batch activities 2.2.3 Use Conditional Joins only when necessary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2.4 Guidelines for error handling. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2.5 Use Sequential System Lane Activities Efficiently . . . . . . . . . . . . . . . . . . . . . . . . 2.2.6 Ensure the Process Center is tuned . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2.7 Physically co-locate the Process Designer with the Process Center . . . . . . . . . . 2.3 Integration Developer Best Practices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.3.1 Business Object Parsing Mode Considerations . . . . . . . . . . . . . . . . . . . . . . . . . .
Copyright IBM Corp. 2012. All rights reserved.
17 19 19 20 20 20 21 21 22 23 23 23 23 iii
4784TOC.fm
2.3.2 Service Component Architecture (SCA) considerations . . . . . . . . . . . . . . . . . . . . 2.3.3 BPEL business process considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.3.4 Human task considerations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.3.5 Business process and human tasks client considerations . . . . . . . . . . . . . . . . . . 2.3.6 Transactionality considerations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.3.7 Invocation style considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.3.8 Mediation flow considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.4 WebSphere InterChange Server migration considerations . . . . . . . . . . . . . . . . . . . . . . 2.5 Authoring environment considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.6 Business Space Developer Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Chapter 3. Performance tuning and configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.1 Performance tuning methodology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.1.1 Pick a set of reasonable initial parameter settings . . . . . . . . . . . . . . . . . . . . . . . . 3.1.2 Monitor the system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.1.3 Use monitoring data to guide further tuning changes . . . . . . . . . . . . . . . . . . . . . . 3.2 Tuning checklist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3 Common tuning parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3.1 Tracing and logging flags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3.2 Java tuning parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3.3 MDB ActivationSpec . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3.4 Thread pool sizes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3.5 JMS connection pool sizes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3.6 JDBC data source parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3.7 Messaging engine properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3.8 Run production servers in production mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.4 Advanced tuning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.4.1 Tracing and monitoring considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.4.2 Tuning for large objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.4.3 Tuning for maximum concurrency. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.4.4 Messaging tuning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.4.5 Clustered topology tuning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.4.6 Web services tuning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.4.7 Power management tuning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.4.8 Set AIX threading parameters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.5 Business Process Choreographer tuning (for BPEL Business Processes). . . . . . . . . . 3.5.1 Tuning Work-Manager-based navigation for business processes . . . . . . . . . . . 3.5.2 Tuning the business process container for JMS navigation . . . . . . . . . . . . . . . . . 3.5.3 Tuning task list and process list queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.5.4 Tuning Business Process Choreographer API calls . . . . . . . . . . . . . . . . . . . . . . . 3.5.5 Tune intermediate components for concurrency . . . . . . . . . . . . . . . . . . . . . . . . . 3.6 BPMN Business Process Tuning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.6.1 Database tuning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.6.2 BPD Queue Size and Worker Thread Pool. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.7 WebSphere ESB tuning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.7.1 Tune the database if using persistent messaging. . . . . . . . . . . . . . . . . . . . . . . . . 3.7.2 Disable event distribution for CEI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.7.3 Configure WSRR cache timeout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.8 IBM Business Monitor tuning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.8.1 Configure Java heap sizes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.8.2 Configure CEI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.8.3 Configure message consumption batch size . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.8.4 Enable KPI caching. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
28 29 30 30 31 33 35 36 37 38 41 42 42 42 43 43 44 45 45 46 46 47 47 48 48 48 48 49 50 52 55 56 57 57 57 57 58 58 59 59 59 60 60 61 61 61 61 61 62 62 62 62
iv
4784TOC.fm
3.8.5 Use table-based event delivery. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.8.6 Enable the Data Movement Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.9 Business Space Tuning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.9.1 Ensure Browser Cache is Enabled . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.9.2 Optimize Complex Task Message Performance. . . . . . . . . . . . . . . . . . . . . . . . . . 3.9.3 Tune the HTTP Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.9.4 Optimize Performance when not using Federation Mode . . . . . . . . . . . . . . . . . . . 3.10 Database: General tuning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.10.1 Provide adequate statistics for optimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.10.2 Place database log files on a fast disk subsystem . . . . . . . . . . . . . . . . . . . . . . . 3.10.3 Place logs on a separate device from the tablespace containers . . . . . . . . . . . . 3.10.4 Provide sufficient physical memory. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.10.5 Avoid double buffering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.10.6 Refine table indexes as required . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.10.7 Archive completed process instances. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.11 Database: DB2-specific tuning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.11.1 Update database statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.11.2 Set buffer pool sizes correctly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.11.3 Maintain proper table indexing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.11.4 Size log files appropriately . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.11.5 Inline LOBs to improve throughput for high volume systems . . . . . . . . . . . . . . . 3.11.6 Use SMS for tablespaces containing large objects. . . . . . . . . . . . . . . . . . . . . . . 3.11.7 Ensure that sufficient locking resources are available . . . . . . . . . . . . . . . . . . . . 3.11.8 Bound the size of the catalog cache for clustered applications . . . . . . . . . . . . . 3.11.9 (Before DB2 V9.5) Size the database heap appropriately . . . . . . . . . . . . . . . . . 3.11.10 (Before DB2 V9.7) Size the log buffer appropriately . . . . . . . . . . . . . . . . . . . . . 3.11.11 (DB2 V9.7 and later) Consider disabling current commit . . . . . . . . . . . . . . . . . 3.11.12 Recommendations for BPEL business processes in IBM BPM 7.5.0 . . . . . . . . 3.11.13 Recommendations for Business Monitor 7.5.0 . . . . . . . . . . . . . . . . . . . . . . . . . 3.12 Database: Oracle specific tuning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.12.1 Update database statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.12.2 Set buffer cache sizes correctly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.12.3 Maintain proper table indexing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.12.4 Size log files appropriately . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.12.5 Recommendations for BPEL business processes in IBM BPM 7.5.0 . . . . . . . . . 3.13 Advanced Java heap tuning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.13.1 Monitoring garbage collection (GC) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.13.2 Setting the heap size for most configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.13.3 Setting the Heap Size when running multiple JVMs on one system . . . . . . . . . . 3.13.4 Reduce or increase heap size if OutOfMemory errors occur . . . . . . . . . . . . . . . 3.14 Tuning for WebSphere InterChange Server migrated workloads . . . . . . . . . . . . . . . . Chapter 4. Initial configuration settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.1 IBM BPM Server settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.1.1 Three tier configuration with Web services and a remote DB2 system (BPEL business processes) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.1.2 Three tier configuration using Human Services with BPMN processes . . . . . . . . 4.1.3 Two tier configuration using file store for JMS for BPEL business processes . . . 4.2 WebSphere ESB settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2.1 WebSphere ESB common settings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2.2 WebSphere ESB settings for Web services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2.3 WebSphere ESB settings for JMS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2.4 DB2 settings for JMS persistent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
62 63 63 63 68 68 69 70 70 70 70 70 71 71 71 72 72 72 73 73 74 74 75 75 76 76 76 76 77 78 78 78 79 79 79 79 80 81 82 82 83 85 86 86 89 90 91 91 92 92 92
Contents
4784TOC.fm
Related publications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . IBM Redbooks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Online resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . How to get Redbooks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Help from IBM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
93 93 93 95 95
vi
4784spec.fm
Notices
This information was developed for products and services offered in the U.S.A. IBM may not offer the products, services, or features discussed in this document in other countries. Consult your local IBM representative for information on the products and services currently available in your area. Any reference to an IBM product, program, or service is not intended to state or imply that only that IBM product, program, or service may be used. Any functionally equivalent product, program, or service that does not infringe any IBM intellectual property right may be used instead. However, it is the user's responsibility to evaluate and verify the operation of any non-IBM product, program, or service. IBM may have patents or pending patent applications covering subject matter described in this document. The furnishing of this document does not give you any license to these patents. You can send license inquiries, in writing, to: IBM Director of Licensing, IBM Corporation, North Castle Drive, Armonk, NY 10504-1785 U.S.A. The following paragraph does not apply to the United Kingdom or any other country where such provisions are inconsistent with local law: INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDES THIS PUBLICATION "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some states do not allow disclaimer of express or implied warranties in certain transactions, therefore, this statement may not apply to you. This information could include technical inaccuracies or typographical errors. Changes are periodically made to the information herein; these changes will be incorporated in new editions of the publication. IBM may make improvements and/or changes in the product(s) and/or the program(s) described in this publication at any time without notice. Any references in this information to non-IBM Web sites are provided for convenience only and do not in any manner serve as an endorsement of those Web sites. The materials at those Web sites are not part of the materials for this IBM product and use of those Web sites is at your own risk. IBM may use or distribute any of the information you supply in any way it believes appropriate without incurring any obligation to you. Information concerning non-IBM products was obtained from the suppliers of those products, their published announcements or other publicly available sources. IBM has not tested those products and cannot confirm the accuracy of performance, compatibility or any other claims related to non-IBM products. Questions on the capabilities of non-IBM products should be addressed to the suppliers of those products. This information contains examples of data and reports used in daily business operations. To illustrate them as completely as possible, the examples include the names of individuals, companies, brands, and products. All of these names are fictitious and any similarity to the names and addresses used by an actual business enterprise is entirely coincidental. COPYRIGHT LICENSE: This information contains sample application programs in source language, which illustrate programming techniques on various operating platforms. You may copy, modify, and distribute these sample programs in any form without payment to IBM, for the purposes of developing, using, marketing or distributing application programs conforming to the application programming interface for the operating platform for which the sample programs are written. These examples have not been thoroughly tested under all conditions. IBM, therefore, cannot guarantee or imply reliability, serviceability, or function of these programs.
vii
4784spec.fm
Trademarks
IBM, the IBM logo, and ibm.com are trademarks or registered trademarks of International Business Machines Corporation in the United States, other countries, or both. These and other IBM trademarked terms are marked on their first occurrence in this information with the appropriate symbol ( or ), indicating US registered or common law trademarks owned by IBM at the time this information was published. Such trademarks may also be registered or common law trademarks in other countries. A current list of IBM trademarks is available on the Web at http://www.ibm.com/legal/copytrade.shtml The following terms are trademarks of the International Business Machines Corporation in the United States, other countries, or both:
AIX alphaWorks CICS Cognos DB2 developerWorks IBM IMS MQSeries POWER6 Redbooks Redpaper Redbooks (logo) Tivoli WebSphere z/OS
The following terms are trademarks of other companies: Intel, Intel logo, Intel Inside logo, and Intel Centrino logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States and other countries. Windows, and the Windows logo are trademarks of Microsoft Corporation in the United States, other countries, or both. Java, and all Java-based trademarks and logos are trademarks or registered trademarks of Oracle and/or its affiliates. UNIX is a registered trademark of The Open Group in the United States and other countries. Linux is a trademark of Linus Torvalds in the United States, other countries, or both. Other company, product, or service names may be trademarks or service marks of others.
viii
4784pref.fm
Preface
This IBM Redpaper publication was produced by the IBM Business Process Manager (BPM) performance team. It provides performance tuning tips and best practices for IBM BPM 7.5 (all editions) and Business Monitor 7.5. These products represent an integrated development and runtime environment based on a key set of service-oriented architecture (SOA) and business process management (BPM) technologies: Service Component Architecture (SCA), Service Data Object (SDO), Business Process Execution Language for Web Services (BPEL), and Business Processing Modeling Notation (BPMN). This paper is aimed at a wide variety of groups, both within IBM (development, services, technical sales, and so forth) and customers. For those who are either considering or are in the early stages of implementing a solution incorporating these products, this document should prove a useful reference, both in terms of best practices during application development and deployment, and as a reference for setup, tuning, and configuration information. This paper provides a useful introduction to many of the issues influencing each product's performance, and can serve as a guide for making rational first choices in terms of configuration and performance settings. Similarly, those who have already implemented a solution using these products might use the information presented here to gain insight as to how their overall integrated solution performance might be improved. All of these products build on the core capabilities of the WebSphere Application Server infrastructure, so BPM solutions also benefit from tuning, configuration, and best practices information for WebSphere Application Server and the corresponding platform Java Virtual Machines (JVMs). Pointers to this information can be found in Related publications on page 89. The reader is encouraged to use this paper in conjunction with these references.
ix
4784pref.fm
Backward-compatible with the latest versions of WebSphere Process Server (Advanced Edition only) and WebSphere Lombardi Edition. IBM Business Monitor 7.5 IBM Business Monitor provides comprehensive business activity monitoring (BAM), enabling users visibility into real-time, end-to-end business operations, transactions, and processes to help optimize processes and increase efficiency. Provides a high-performance business activity monitoring solution for processes and applications running in disparate environments which may or may not be implemented using any BPM technology. Built-in tools and runtime support for integrated Business Activity Monitoring of IBM Business Process Manager Fully integrated Cognos Business Intelligence Server 10.1.1 for advanced analysis and reporting on historical data Automatic generation of dashboards for your Business Process Modeling Notation 2.0 (BPMN2) processes, with real-time visibility to process instances, key performance indicators (KPIs), Cognos reports, and annotated BPMN2 process diagrams Fine-grained security to enable or prevent anyone to see a wide range of information depth or detail Enhanced business user customization of data filtering and dashboard controls & reports. Enable views of KPIs, metrics, and alerts through Web interfaces, iPad, mobile devices, and corporate portals. Available for distributed platform and z/OS.
Publication structure
The first three chapters of this publication are about best practices and tuning considerations for three different phases of IBM BPM projects: Architecture Development Deployment At least one of these chapters will be of interest to any reader of this publication, and many will find value in all three chapters. There is a list of key tuning and deployment guidelines in 1.1, Top tuning and deployment guidelines on page 2. We urge all readers to take note of this list because the authors have seen numerous instances where this information is useful. Chapter 4, Initial configuration settings on page 81 describes configuration options for representative performance workloads. The publication concludes with a list of useful references in Related publications on page 89. Below is a summary of each chapter: Chapter 1, Architecture best practices on page 1 This chapter provides recommendations for architecture and topology decisions that produce well-performing and scalable solutions. Chapter 2, Development best practices on page 17 This chapter presents guidelines for solution developers that will lead to high-performing systems. Chapter 3, Performance tuning and configuration on page 39
4784pref.fm
This chapter presents a discussion of the configuration parameters and settings for the major software components that comprise a business process management solution. Chapter 4, Initial configuration settings on page 81 This chapter provides details of the software configurations used for representative workloads used by the IBM performance team working on these products. Related publications on page 89 This chapter links to best practices, performance information, and product information for both the products discussed in this publication, and related products such as WebSphere Application Server, DB2, and so on.
Comments welcome
Your comments are important to us! We want our papers to be as helpful as possible. Send us your comments about this paper or other IBM Redbooks publications in one of the following ways: Use the online Contact us review Redbooks form found at: ibm.com/redbooks
Preface
xi
4784pref.fm
Send your comments in an e-mail to: [email protected] Mail your comments to: IBM Corporation, International Technical Support Organization Dept. HYTD Mail Station P099 2455 South Road Poughkeepsie, NY 12601-5400
xii
4784ch01.fm
Chapter 1.
4784ch01.fm
4784ch01.fm
Process Choreographer messaging. For further information, see 3.5.1, Tuning Work-Manager-based navigation for business processes on page 55. Avoid unnecessary use of asynchronous invocations. Asynchronous invocation is often needed on the edges of modules, but not within a module. Utilize synchronous preferred interaction styles, as described in Set the preferred interaction style to Synchronous whenever possible on page 32. Avoid overly granular transaction boundaries in SCA and BPEL. Every transaction commit results in expensive database and messaging operations. Design your transactions with care, as described in 2.3.6, Transactionality considerations on page 30.
1.2 Modeling
This section describes best practices for modeling. IBM Business Process Manager (Advanced Edition) offers two authoring environments. IBM Process Designer (hereafter called Process Designer) is used to model and execute high-level BPMN business processes, which often have human interactions. Note that this is the only authoring tool for IBM BPM 7.5.0 Standard Edition. IBM Integration Designer (hereafter called Integration Designer) is leveraged to build and implement services that are completely automated or that invoke other services such as web services, enterprise resource applications, or applications running in CICS and IMS, which already exist in the enterprise. It is also the tool to use to author BPEL business processes. Note that these authoring environments both interact with the Process Center, which is a shared repository and runtime environment. There are two roles and skill sets to consider when developing business process management (BPM) applications using these environments: The business author is responsible for authoring all business processes. The business author is able to use services, but is not interested in the implementation details or how they work. The business author uses Process Designer to create business process diagrams (BPDs), and advanced integration services (AISs) to collaborate with the integration programmer. The integration programmer is responsible for doing all of the integration work necessary to support the processes the business author creates. For example, the integration programmer will implement all the AISs, and will produce mappings between backend formats and the requirements of current applications. The integration programmer uses Integration Designer. The rest of this section is organized based on the type of user, with separate sections describing common best practices, Process Designer (business authors) best practices, and Integration Designer (integration programmer) best practices.
4784ch01.fm
discussed further in the developerWorks article Software components: coarse-grained versus fine-grained, available at the following website: http://www.ibm.com/developerworks/webservices/library/ws-soa-granularity/
4784ch01.fm
Choose query tables for task list and process list queries
Query tables are designed to provide good response times for high-volume task lists and process list queries. Query tables offer improved query performance: Improved access to work items reduces the complexity of the database query.
Chapter 1. Architecture best practices
4784ch01.fm
Configurable high-performance filters on tasks, process instances, and work items allow for efficient filtering. Composite query tables can be configured to bypass authorization through work items. Composite query tables allow the definition of query tables that reflect the information that is displayed on task lists and process lists presented to users. For further information, see the references below: WebSphere Process Server Query Table Builder http://www.ibm.com/support/docview.wss?uid=swg24021440 Query Tables in Business Process Choreography in the IBM BPM 7.5 Information Center: http://publib.boulder.ibm.com/infocenter/dmndhelp/v7r5mx/topic/com.ibm.wbpm.mai n.doc/ic-homepage-bpm.html
<xs:element name="AElement"> <xs:simpleType name="AElementType"> <xs:restriction base="xs:string"> <xs:minLength value="0" /> <xs:maxLength value="8" /> </xs:restriction> </xs:simpleType> </xs:element>
Example 1-2 AElement referenced from another file
4784ch01.fm
This has been shown to perform poorly. It is better to define the type concretely and make any new elements use this type. So, A.xsd becomes what is shown in Example 1-3.
Example 1-3 AElementType XSD
<xs:simpleType name="AElementType"> <xs:restriction base="xs:string"> <xs:minLength value="0" /> <xs:maxLength value="8" /> </xs:restriction> </xs:simpleType> B.xsd becomes what is shown in Example 1-4.
Example 1-4 BElement XSD
1.3 Topology
In this section we discuss choosing an appropriate topology for your solution.
4784ch01.fm
4784ch01.fm
4784ch01.fm
example, a target application that can process 10 requests per second with an average response time of 1 second can process approximately 10 requests at the same time (throughput / response time = concurrency). The throughput capacity of target applications is critical to projecting the end-to-end throughput of an entire application. Also, the concurrency of target applications should be considered when tuning the concurrency levels of the upstream IBM BPM 7.5.0-based components. For example, if a target application can process 10 requests at the same time, the process server components that invoke this application should be tuned so that the simultaneous request from IBM BPM 7.5.0 at least matches the concurrency capabilities of the target. Additionally, avoid overloading target applications, because such configurations do not result in any increase in overall application throughput. For example, if 100 requests are sent to a target application that can only process 10 requests at the same time, no throughput improvement is realized versus tuning such that the number of requests made matches the concurrency capabilities of the target. For service providers that might take a long time to reply, either as part of main line processing or in exception cases, do not utilize synchronous invocations that require a response. This is to avoid tying up the business process and its resources until the service provider replies.
Browser
Network
HTTP Server
DB Server
Backend/ Databases
Servers
1. Browser AJAX applications are, by definition, applications that perform work (to some extent) on the client-side, inside the browser. All typical client work, like building the UI, is done on the client side, which differentiates these applications from classical web applications, where only the rendering of HTML is done in the browser. As discussed elsewhere in this 10
IBM Business Process Management (BPM) V7.5 Performance Tuning
4784ch01.fm
paper, optimizing the browser and client system are key to delivering excellent performance. 2. Network In contrast to static web pages, AJAX applications load the content of a page dynamically as needed instead of loading the complete page at once, which means that instead of a few (or one) requests with a big payload, AJAX applications often send many requests with smaller payloads. Hence, delays in the network can have a big impact on Business Space response times because they add time to each message and in the end, add up to a bigger delay for the overall page response time. Note that the illustration in Figure 1-1 on page 10 is simplified because the network also plays a role in communications between the servers and the databases and even for inter-server-communication in a clustered setup. However, due to the nature of AJAX applications, the first point to analyze for delays is generally between the browser and the servers. 3. Servers The server infrastructure is responsible for handling the requests from the clients that are attached to it, as well as for running business applications (processes, state machines, web services, and so on), and integrating back-end services. The setup of this infrastructure heavily depends on the chosen topology. The servers which play an important role for Business Space are: a. The HTTP server An HTTP server is not part of all topologies. However, for environments that aim to serve thousands of users, a HTTP server is indispensable. All static and dynamic requests from Business Space clients will arrive at the HTTP server, which can cache and consequently send the static (cached) content back to the client and route dynamic request to the WebSphere Process Server REST API. Furthermore, an HTTP server can provide load balancing and support high-availability-scenarios. b. BPM 7.5.0 Server BPM 7.5.0 Servers execute a variety of business logic (e.g. BPEL and BPMN business processes), but in the scope of this section we focus only on actions that play a role for the Business Space Widgets, such as querying task lists, creating and claiming tasks, and so on. 4. Databases Two databases often play a key role for BPM 7.5.0 BSpace Solutions: the Business Space database and the Business Process Choreographer database (BPEDB). a. Business Space database The Business Space database holds configuration-related information and is infrequently accessed by each user. b. Business Process Choreographer database (BPEDB) All types of process- and task-information are stored in the BPEDB, which is therefore frequently updated and read when working with human task widgets.
11
4784ch01.fm
12
4784ch01.fm
13
4784ch01.fm
http://www.ibm.com/developerworks/webservices/library/ws-largemessaging/
14
4784ch01.fm
system and other applications, should not exceed the physical memory available on the system. IBM BPM 7.5.0 servers run most efficiently on a 64-bit JVM instance due to the much larger amount of memory that is accessible in this mode. The performance and memory footprint of a 64-bit runtime server is about the same as the 32-bit version.This was not the case for earlier versions, such as BPM v6.1 and v6.2. The following list details the factors to consider when determining in which of these modes to run: 64-bit mode is an excellent choice for applications whose liveset approaches or exceeds the 32-bit limits. Such applications either experience OutOfMemoryExceptions or suffer excessive time in GC. We consider anything greater than 10% of time in GC as excessive. These applications exhibit much better performance when allowed to run with the larger heaps they need. However, there must always be sufficient physical memory on the system to back the Java heap size. 64-bit mode is also an excellent choice for applications that, though well-behaved on 32-bit, could be algorithmically modified to perform better with larger heaps. An example would be an application that frequently persists data to a data store to avoid maintaining a very large in-memory cache, even if such a cache would greatly improve throughput. Recoding such an application to tradeoff the more space available in 64-bit heaps for less execution time yields better performance. Moving to 64-bit may cause some degradation in throughput if a 32-bit application fits well with a 1.5 - 2.5 GB heap, and the application is not expected to grow significantly. For these situations where the memory limitation is not a signifcant factor, using 32-bit JVMs may be a better choice than 64-bit.
1.7.2 Dashboard
The platform requirements of the Business Space and its Monitor widgets are relatively modest compared to those of Monitor server and the database server. The most important consideration for good Dashboard performance is to size and configure the database server
15
4784ch01.fm
correctly. Be sure it has enough CPU capacity for anticipated data mining queries, enough RAM for bufferpools and so forth, and plenty of disk arms.
16
4784ch02.fm
Chapter 2.
17
4784ch02.fm
18
4784ch02.fm
2.2.2 Dont use Multi Instance Loops (MILs) in the System Lane, or for batch activities
Use caution when using sub-BPDs as the activity of a multi instance loop (MIL). There is no issue if the first activity is a user task instead of a system lane. However, MILs should not be used to attempt to execute batch or system lane activities. This pattern can generate an excessive number of tokens for the BPD to process. Figure 2-1 shows an example of a good BPD design pattern.
19
4784ch02.fm
20
4784ch02.fm
Following is a demonstration of this issue, with Figure 2-3 showing the poor usage pattern (multiple consecutive system lane activities), and Figure 2-4 showing the more optimal usage pattern (one system lane activity that incorporates the multiple activities in the previous diagram).
21
4784ch02.fm
2.2.7 Physically co-locate the Process Designer with the Process Center
The Process Designer interacts very frequently with the Process Center for authoring tasks. As such, network latency should be minimized to provide optimal response times. Locate the Process Center in the same physical location as the Process Designer users. If this is not possible, the Process Designer users should remotely connect to the environment where the Process Center is physically located, and use the Process Designer via that mechanism.
Overview
WebSphere BPM version 7.001 introduced BO Lazy parsing mode. In this mode, when BOs are created their properties are not populated until they are accessed by the application. Also, when reading XML input, the stream is incrementally parsed and properties are not materialized until they are accessed. This is in contrast to Eager parsing mode, where the input XML stream is immediately fully parsed (with some exceptions for specific mediation primitives) and materialized into a complete in-memory data object representation. Lazy parsing utilizes the XML Cursor Interface (XCI) implementation of SDO provided by the WebSphere Application Server Feature Pack for SCA, which is delivered as part of IBM BPM 7.5.0. In this mode, the input XML stream is kept in memory throughout the life time of the corresponding BO. Nodes are created in memory by the cursor based XML parser only when they are traversed, and properties and attributes are evaluated only when they are requested by the application. Parsing the XML stream in this fashion delivers better performance than eager modes complete parsing for many applications. This is particularly true if only a small portion of the BO is accessed during the application execution. Lazy parsing also reuses the XML stream when BOs are serialized, e.g. for outbound service calls. This results in faster serialization since it is not necessary to serialize the entire in-memory BO into XML strings. Lazy parsing will automatically detect, and correct, if namespaces in the output stream are different than those in the original input stream. This form of serialization is used for all bindings and internal BPM runtime components, such as the Business Process Choreographer (BPC) container, and when custom code calls BO serialization. To further optimize performance, Lazy parsing also employs a technology called copy-on-write, where properties in BOs are lazily copied. When the copy operation is initially performed, the target BO just points to the source BOs node tree; no properties are copied at this point. Subsequent modifications of either the source or target BO trigger a split of the affected node in the BO tree, copying BO properties only as needed. Modifications occur in the local copy of the corresponding node. Copy-on-write is completely transparent to the application.
22
4784ch02.fm
23
4784ch02.fm
In BPM 7.5.0, Lazy parsing delivers excellent performance for XML-based applications that use BOs or messages approximately 3 KB or larger, and the performance of Lazy parsing is generally better than or about equal to Eager parsing for other scenarios.
24
4784ch02.fm
WESB mediations with multiple mediation primitives are likely to see performance improvements when Lazy parsing is used. When using Eager parsing, BOs are often serialized before invoking the next mediation primitive, and then deserialized once that mediation primitive is invoked. Lazy parsing mode reduces the cost of each serialization and deserialization by avoiding unnecessary materialization of unmodified properties in the data stream. While applications that fall into the sweet spots discussed above will likely benefit from Lazy parsing, often significantly, applications that dont have those attributes should see little difference in performance and can choose either Lazy or Eager parsing. For example, applications that parse non-XML data streams such as WebSphere Adapters and non-XML data handlers, applications that create BOs directly using the BOFactory service, and application that use very small XML messages (as a rule of thumb, < 3 KB) should perform similarly whether Lazy or Eager parsing mode is chosen in BPM 7.5.0. WESB mediation flows which only access the message header or which contain a single mediation primitive may see slightly better performance when using Eager parsing. For example a ServiceGateway with a single Filter mediation which routes based on the header content. However it should be noted that once multiple mediation primitives are added to a flow performance is likely to be better in Lazy parsing mode.
25
4784ch02.fm
http://publib.boulder.ibm.com/infocenter/dmndhelp/v7r5mx/index.jsp?topic=%2Fcom.ib m.wbpm.wid.main.doc%2Fnewapp%2Ftopics%2Fclibrary.html Lazy Parsing is optimized to exploit share-by-reference libraries. When a BO is passed from one module to another as a parameter of a synchronous SCA service invocation, a lazy copy is used if the source and target modules share the BO schema through a share-by-reference library. Without the share-by-reference optimization, the BO is serialized on the caller side and deserialized on the callee side.
Error handling
If the XML byte stream being parsed is ill-formed, parsing exceptions occur: With Eager parsing, the exceptions occur as soon as the BO is parsed from the inbound XML stream. With Lazy parsing, the parsing exceptions occur latently when the BO properties are accessed and the portion of the XML that is ill-formed is parsed. To properly handle ill-formed XML for either parsing mode, select one of the following options: Deploy a mediation flow component on the application edges to validate inbound XML. Author lazy error-detection logic at the point where BO properties are accessed.
4784ch02.fm
performance in Lazy parsing mode. However if an XSLT primitive refers directly to a stylesheet which has been edited manually the stylesheet will not be regenerated when the application is built. In this case performance will be improved by removing the whitespace directive ( <xsl:strip-space elements="*"/> ) if it appears and by ensuring that indentation is disabled ( indent="no" ) unless specifically required.
Private APIs
The BO programming model provides support for BO APIs and a set of Service Data Object (SDO) APIs. In some cases, applications might use additional implementation-specific APIs that are not part of the supported APIs for BOs. For example, an application might use the Eclipse Modeling Framework (EMF) APIs. Although these APIs may have worked in prior BPM releases, and in Eager parsing mode, they are not supported APIs for accessing BOs. EMF APIs are considered private to the implementation of BOs and should not be used by applications. In all cases, it is strongly recommended that private APIs be removed from the application and all BO access should by done using the supported API set.
Migration
All applications developed prior to BPM 7.5 used Eager parsing mode by default. When they are migrated using the BPM runtime migration tools, they will continue to run in Eager parsing mode. To enable an application originally developed using Eager parsing to be configured to use Lazy parsing, first use the IID 7.5 to migrate the artifacts of the application. After migration, use the IID 7.5 to configure the application to use Lazy parsing. For information on migrating artifacts in IBM Integration Developer, go the following website: http://publib.boulder.ibm.com/infocenter/dmndhelp/v7r5mx/index.jsp?topic=%2Fcom.ib m.wbpm.wid.imuc.doc%2Ftopics%2Ftmigsrcartwid.html For information on setting the parsing mode, go to the following website: http://publib.boulder.ibm.com/infocenter/dmndhelp/v7r5mx/index.jsp?topic=%2Fcom.ib m.wbpm.wid.main.doc%2Fnewapp%2Ftopics%2Ftconfigbo.html
27
4784ch02.fm
4784ch02.fm
29
4784ch02.fm
In EJB applications, make sure that transactions are not too time consuming. Long-running transactions create long-lasting locks in the database, which prevent other applications and clients to continue processing. Chose the protocol that best suits your needs. In a J2EE environment, use the HTM and BFM EJB APIs. If the client application is running on a IBM BPM 7.5 Server, use the local EJB interface. In a Web 2.0 application, use the REST API. In an application that runs remote to the process container, the Web services API is an option. Clients that follow a page-flow pattern should consider the following issues: Use the completeAndClaimSuccessor() API if possible. This provides optimal response time. Applications that assign the next available task to the user can use the claim(String queryTableName, ) method on the Human Task Manger EJB interface. It implements a performance-optimized mechanism to handle claim collisions. Do not put asynchronous invocations between two steps of a page-flow, because the response time of asynchronous services increases as the load on the system increases. Where possible, do not invoke long-running sub-processes between two steps of a page-flow, because long-running sub-processes are invoked using asynchronous messaging. Clients that present task lists and process lists to the user should consider the following factors: Use query tables for task list and process list queries. Do not loop over the tasks displayed in the task or process list and execute an additional remote call for each object. This prevents the application from providing good response times and good scalability. Design the application so that all information is retrieved from a single query table during task list and process list retrieval. For instance, do not make calls to retrieve the input message for task list or process list creation.
30
4784ch02.fm
31
4784ch02.fm
Use Commit after for inline human tasks to increase responsiveness to human users. When a human user issues a task completion, the thread/transaction handling that action is used to resume navigation of the human task activity in the process flow. The users task completion action does not complete until the process engine commits the transaction. If the Participates setting is used, the commit gets delayed and forces a longer response time to the user. This is a classic response time versus throughput tradeoff. Starting with the 6.2.0 release, Receive and Pick activities in BPEL flow are allowed to define their own transactional behavior property values. If not set, the default value of initiating a Receive or Pick activity is Commit after. Consider using Participates where possible, because that behavior performs better.
32
4784ch02.fm
Asynchronous. This can cause downstream invocations to be asynchronous if the Preferred Interaction Style is Any. For an SCA import, its Preferred Interaction Style can be used to specify whether the cross-module call should be Synchronous or Asynchronous. For other imports that represent asynchronous transports such as MQ or JMS, it is not necessary to set the Preferred Interaction Style to Asynchronous. Doing so introduces an unnecessary asynchronous hop between the calling module and the invocation of the transport.
33
4784ch02.fm
asynchronous callouts have been configured along with parallel waiting in the FanOut section of the flow: In the case of iteration of array, configuring the FanOut to check for asynchronous responses after all/N messages have been fired. In case of extra wires/FlowOrder primitive - by default. If there are a number of services in a fan-out section of a mediation flow, calling these synchronously results in an overall response time equal to the sum of the individual service response times. Calling the services asynchronously (with parallel waiting configured) results in a response time equal to at least the largest individual service response time in WebSphere ESB plus the sum of the time taken by WebSphere ESB to process the remaining service callout responses residing on the messaging engine queue. For a FanOut/FanIn block the processing time for any primitives before or after the service invocations needs to be added in both cases. To optimize the overall response time when calling services asynchronously in a FanOut/FanIn section of a mediation flow, invoke the services in the order of expected latency (highest latency first), if known. There is a trade off between parallelism and additional asynchronous processing to consider. The suitability of asynchronous processing depends on the size of the messages being processed, the latency of the target services, the number of services being invoked, and any response time requirements expressed in service level agreements. Running performance evaluations on mediation flows including fan-outs with high latency services is recommended if asynchronous invocations are being considered. The default quality of service on service references is Assured Persistent. A substantial reduction in asynchronous processing time can be gained by changing this to Best Effort (non-persistent), which eliminates I/O to the persistence store but the application must tolerate the possibility of lost request or response messages. This level of reliability for the service integration bus can discard messages under load and might require tuning.
4784ch02.fm
35
4784ch02.fm
available SCA bindings, development effort spent to migrate manually to an SCA binding removes the dependency on a legacy adapter and provides better performance. The WebSphere InterChange Server Migration Wizard in IBM Integration Developer offers a feature to merge the connector and collaboration module together. Enable this option, if possible, as it increases performance by reducing cross-module SCA calls. WebSphere InterChange Server Collaborations are migrated into IBM BPM 7.5 BPEL processes. The resultant BPEL processes can be further customized and made more efficient. Migrated BPEL processes enable support for compensation by default. If the migrated workload does not make use of compensation, this support can be disabled to gain performance. The relevant flag can be found in the IBM Integration Developer by navigating to process name properties Details Require a compensation sphere context to be passed in. The generated BPEL flows still make use of the ICS APIs to perform business object and collaboration level tasks. Development effort spent cleaning up the migrated BPEL to use IBM BPM APIs instead of the ICS APIs results in better performance and better maintainability.
Investigate the possibility of replacing BPEL processes produced by migration with other artifacts. All WebSphere InterChange Server collaborations currently get migrated into BPEL processes. For certain scenarios, other IBM BPM 7.5 server artifacts (for example business rules) might be better choices. Investigate the BPEL processes produced by migration to ensure the processes are the best fit for your scenario. Disable Message Logger calls in migration-generated mediation flow component (MFC) components. The WebSphere InterChange Server Migration Wizard in IBM Integration Developer 7.5 generates an MFC to deal with the mapping details of a connector. It contains the code for handling synchronous and asynchronous calls to maps that transform application-specific business objects to generic business objects and generic business objects to application-specific objects. The generated MFC contains embedded MessageLogger calls that log the message to a database. Disable these calls if not required in your business scenario to reduce writes to the database and thus improve performance. (Select the MessageLogger instance, choose the Details panel, and clear the Enabled checkbox.) Reduce memory pressure by splitting the shared library generated by the migration wizard. The migration wizard creates a single shared library and puts all migrated business objects, maps, and relationships in it. This library is then shared by copy by all the migrated modules. This can cause memory bloat for cases where the shared library is large and a large number of modules are present. The solution is to re-factor manually the shared library into multiple libraries based on functionality or usage and modify modules to only reference the shared libraries that they need. If the original WebSphere InterChange Server maps contain many custom map steps, the development effort spent in rewriting those map steps results in better performance. The WebSphere InterChange Server Migration Wizard in IBM Integration Developer 7.5 generates maps that make use of the ICS APIs, which is a translation layer above IBM BPM 7.5 server technologies. Removing this layer by making direct use of IBM BPM 7.5 Server APIs avoids the cost of translation and produces better performance.
36
4784ch02.fm
37
4784ch02.fm
Browser Tools
Following are observations for a few of the browser tools that are available for obtaining response time measurements, counting requests, and analyzing caching. Firebug's Net tab is very useful for obtaining request timings, analyzing request/response headers, and counting the number of requests. However it reports requests that are satisfied from the browser cache as 200 responses. You can still determine that it is a cached request because there will be a "Cache" tab on the request which will report that the request was actually satisfied from the browser cache. However, if you copy and paste the results into another document (i.e an e-mail note) the cache tab is not copied, so it is possible to be misled by the 200 responses and draw an incorrect conclusion that caching isn't effective when it actually is. Fiddler is another extremely powerful tool, which also has the advantage of supporting both IE and FireFox browsers. However, since it acts as a proxy between the browser and the server and cached requests are handled internally by browsers, they never appear in Fiddler. This clearly is detrimental in determining which requests are fulfilled from the browser cache, but on the other hand it is useful to use Fiddler to analyze only the requests that actually are sent to the server. HttpWatch does not have the limitations described above, since it is supported on both IE and FireFox browsers, the results copy and paste easily both into a spreadsheet or a document, and it displays cached requests in a straightforward manner.
38
4784ch03.fm
Chapter 3.
39
4784ch03.fm
For each JVM process started on a physical machine (for example, process server, messaging engine server, and so forth): Use tools such as ps or equivalent to get core and memory usage per process. Collect verbosegc statistics. For each IBM BPM Server or messaging engine JVM, use Tivoli Performance Viewer to monitor: Data connection pool utilization for each data source Thread pool utilization for each thread pool (Web container, default, work managers)
40
4784ch03.fm
Business Process Choreographer (for BPEL business processes) Use work-manager based navigation for long running processes, and optimize the message pool size and intertransaction cache size. Use query tables to optimize query response time
41
4784ch03.fm
Optimize Business Flow Manager resources: Database connection (BPEDB), Activation specification (BPEInternalActivationSpec) JMS connection (BPECF and BPECFC)
Optimize the database configuration for the Business Process Choreographer database (BPEDB) Optimize indexes for SQL statements that result from task and process list queries using database tools such as the DB2 design advisor Turn off state observers that are not needed (for example, turn off audit logging). BPMN Business Processes Increase log file size for twproc database (to 16384 pages) Enable filesystem caching for twproc database: db2 alter tablespace userspace1 file system caching Exclude the table, SIBOWNER, from automatic runstats execution Ensure that database statistics are up to date. Create new indexes as described in the technote at: http://www-01.ibm.com/support/docview.wss?uid=swg21474536 Messaging and message bindings Optimize activation specification (JMS, MQJMS, MQ) Optimize queue connection factory (JMS, MQJMS, MQ) Configure connection pool size (JMS, MQJMS, MQ) Configure service integration bus data buffer Sizes Place database tablespaces and logs on a fast disk subsystem Place logs on a separate device from the tablespace containers Maintain current indexes on tables Update database statistics Set log file sizes correctly Optimize buffer pool size (DB2) or buffer cache size (Oracle)
Database
Java Set the heap and nursery sizes to manage memory efficiently Choose the appropriate garbage collection policy (generally, -Xgcpolicy:gencon) Business Monitor Configure CEI Set message consumption batch size Enable KPI caching Use table-based event delivery Enable the data movement service
42
4784ch03.fm
43
4784ch03.fm
4784ch03.fm
DefaultWorkManager BPENavigationWorkManager
45
4784ch03.fm
46
4784ch03.fm
Most tracing and monitoring is controlled through the administrative console. Validate that the appropriate level of tracing and monitoring is set for the PMI Monitoring, Logging, and Tracing settings through the administrative console. Use the administrative console to validate that the Audit logging and Common Event Infrastructure logging check boxes are cleared in the Business Flow Manager and the Human Task Manager, unless these capabilities are required for business reasons. IBm Integration Developer is also used to control event monitoring. Check the Event Monitor tab for your components and business processes to ensure that event monitoring is applied judiciously.
47
4784ch03.fm
minimize the amount of concurrent processing that occurs. These settings are not optimal for peak throughput, so if a given adapter instance must support both high throughput for smaller objects interspersed with occasional large objects, trade-offs must be made.
48
4784ch03.fm
specs associated with SCA modules and long-running business processes to improve performance and scalability, especially for large multi-core systems.
49
4784ch03.fm
connections can be created and the requester waits until a physical connection that is currently in use is returned to the pool, or a ConnectionWaitTimeout exception is issued. For example, if the Maximum Connections value is set to 5, and there are five physical connections in use, the pool manager waits for the amount of time specified in Connection Timeout for a physical connection to become free. The threads waiting for connections to the underlying resource are blocked until the connections are freed up and allocated to them by the pool manager. If no connection is freed in the specified interval, a ConnectionWaitTimeout exception is issued. If Maximum Connections is set to 0, the connection pool is allowed to grow infinitely. This has the side effect of causing the Connection Timeout value to be ignored. The general guideline for tuning connection factories is that their maximum connection pool size needs to match the number of concurrent threads multiplied by the number of simultaneous connections per thread. For each JMS, MQ, or MQJMS Import, there is a connection factory created during application deployment. The maximum connections property of the JMS connection factorys connection pool should be large enough to provide connections for all threads concurrently executing in the import component. For example, if 100 threads are expected to run in a given module, the maximum connections property should be set to 100. The default is 10. From the connection factory configuration panel, open Additional Properties Connection pool properties. Set the Maximum Connections property to the maximum size of the connection pool.
50
4784ch03.fm
Engine (MEs) checkbox. When this profile is used, file stores are used for BPE and SCA service integration buses.
Create the DB2 database and load the data store schemas
Instead of having a DB2 database per messaging engine we put all messaging engines into the same database using different schemas to separate them, as shown in Table 3-1.
Table 3-1 Messaging engine schemas Schema SCASYS SCAAPP CEIMSG BPCMSG Messaging engine box01-server1.SCA.SYSTEM.box01Node01Cell.Bus box01-server1.SCA.APPLICATION. box01Node01Cell.Bus box01-server1.CommonEventInfrastructure_Bus box01-server1.BPC.box01Node01Cell.Bus
Follow these steps: 1. Create one schema definition for each messaging engine with the following command: WAS Install\bin\sibDDLGenerator.bat -system db2 -version 8.1 -platform windows -statementend ; -schema BPCMSG -user user >createSIBSchema_BPCMSG.ddl In this example (used on a Windows operating system), WAS Install represents the IBM BPM Installation directory and user represents the user name. 2. Repeat the command for each schema/messaging engine. 3. To distribute the database across several disks, edit the created schema definitions and put each table in a tablespace named after the schema used. For example, SCAAPP
51
4784ch03.fm
becomes SCANODE_TS, CEIMSG becomes CEIMSG_TS and so on. The schema definition should look like Example 3-1 after editing.
Example 3-1 Schema definition
CREATE SCHEMA CEIMSG; CREATE TABLE CEIMSG.SIBOWNER ( ME_UUID VARCHAR(16), INC_UUID VARCHAR(16), VERSION INTEGER, MIGRATION_VERSION INTEGER ) IN CEIMSG_TB; CREATE TABLE CEIMSG.SIBCLASSMAP ( CLASSID INTEGER NOT NULL, URI VARCHAR(2048) NOT NULL, PRIMARY KEY(CLASSID) ) IN CEIMSG_TB; . It is possible to provide separate tablespaces for the various tables here. Optimal distribution depends on application structure and load characteristics. In this example one tablespace per data store was used. 4. After creating all schema definitions and defined tablespaces for the tables, create a database named SIB. 5. Create the tablespaces and distribute the containers across available disks by issuing the following command for a system managed tablespace: DB2 CREATE TABLESPACE CEIMSG_TB MANAGED BY SYSTEM USING( '<path>\CEIMSG_TB' ) Place the database log on a separate disk if possible. 6. Create the schema of the database by loading the four schema definitions into the database. For more information about database and DB2-specific tuning, see the following sections: 3.10, Database: General tuning on page 67 3.11, Database: DB2-specific tuning on page 69
52
4784ch03.fm
When creating a data source, perform the following tasks. 1. Clear the Use this Data Source in container managed persistence (CMP) checkbox. 2. Set a component-managed authentication alias. 3. Set the database name to the name used for the database created earlier for messaging, (for example, SIB). 4. Select a driver type of type 2 or type 4. Per DB2 recommendations, use the JDBC Universal Driver type 2 connectivity to access local databases and type 4 connectivity to access remote databases. A type 4 driver requires a host name and valid port to be configured for the database.
53
4784ch03.fm
A messaging engine in a cluster with a One of N policy (to preserve event ordering) might become the bottleneck. Scaling options include: Hosting the active cluster member on a more powerful hardware server, or removing extraneous load from the existing server. If the messaging engine cluster is servicing multiple busses, and messaging traffic is spread across these busses, consider employing a separate messaging engine cluster per bus. If a particular bus is a bottleneck, consider whether destinations on that bus can tolerate out of order events. In this case, the cluster policy can be changed to allow workload balancing with partitioned destinations. Partitioning a bus also has considerations for balancing work across the messaging engine cluster members. For further information, see the following website: http://publib.boulder.ibm.com/infocenter/wasinfo/v7r0/index.jsp?topic=/co m.ibm.websphere.pmc.nd.doc/concepts/cjt0014_.html A database server might become the bottleneck. Consider the following approaches: If the database server is hosting multiple databases that are active (for example, BPEDB, twproc, twperfdb, and MEDB), consider hosting each database on a separate server. If a single database is driving load, consider a more powerful database server. Beyond these items, database partitioning and clustering capabilities can be exploited.
54
4784ch03.fm
55
4784ch03.fm
The key parameters are as follows: Enable advanced performance optimization Select this property to enable both the Work-Manager-based navigation and InterTransactionCache optimizations. Work-Manager-Based Navigation Message Pool Size This property specifies the size of the cache used for navigation messages that cannot be processed immediately, provided Work-Manager-based navigation has been enabled. The cache defaults to a size of (10 * thread pool size of the BPENavigationWorkManager) messages. If this cache reaches its limit, JMS-based navigation will be used for new messages. For optimal performance ensure this Message Pools size is set to a sufficiently high value. InterTransaction Cache Size This property specifies the size of the cache used to store process state information that has also been written to the BPE database. It should be set to twice the number of parallel running process instances. The default value for this property is the thread pool size of the BPENavigationWorkManager. In addition, you can customize the number of threads for the work manager using these settings by selecting Resources Asynchronous Beans Work Managers BPENavigationWorkManager. The minimum and maximum number of threads should be increased from their default values of 5 and 12, respectively, using the methodology outlined in 3.4.3, Tuning for maximum concurrency on page 48. If the thread pool size is modified, the work request queue size should also be modified and set to be twice the maximum number of threads.
56
4784ch03.fm
Choreographer database. These SQL queries might need special tuning to provide optimal response times: Up-to-date database statistics are key for good SQL query response times. Databases offer tools to tune SQL queries. In most cases, additional indexes improve query performance with some potential impact on process navigation performance. For DB2, the DB2 design advisor can be used to guide in choosing indexes.
57
4784ch03.fm
58
4784ch03.fm
59
4784ch03.fm
60
4784ch03.fm
61
4784ch03.fm
3. Click on the Advanced tab and make sure the "Empty Temporary Internet Files folder when browser is closed" checkbox is unchecked, as shown in Figure 3-2 on page 63.
62
4784ch03.fm
4. Click OK to save the settings. You should restart your browser to make sure the changes have taken effect. Use the following procedure for Firefox 3.6. 1. Select Tools Options. 2. Select the Privacy tab and make sure it says Firefox will: Remember History, as shown in Figure 3-3 on page 64.
63
4784ch03.fm
3. If Remember history is the setting, then you are done (caching is enabled properly). If "Never remember history" is selected, caching is disabled and the setting needs to be changed. If "Use custom settings for history" is selected, there are a couple options that can be selected that will still allow caching, as shown in Figure 3-4 on page 64.
64
4784ch03.fm
a. Make sure the private browsing session is disabled (screenshot above shows it enabled, this checkbox should be unchecked). This means caching is enabled, but once the browser is closed everything gets erased (not just cache but browsing history, etc it is as if you were never using the browser). b. If private browsing is not selected, then make sure the "Clear history when Firefox closes" box is unchecked, as shown in Figure 3-5 on page 65.
4. Click OK to save your settings and restart the browser to make sure changes have taken effect.
65
4784ch03.fm
http://publib.boulder.ibm.com/httpserv/ihsdiag/ihs_performance.html For further information on tuning BSpace, also see the Business Space performance and scalability paper: http://www-01.ibm.com/support/docview.wss?uid=swg27020684&wv=1
66
4784ch03.fm
Note: To use only the BPD processes and human services of a single application server or cluster, change the Process services and Task services to the Business process definition engine REST services of the application server that is running your BPD processes and human services.
67
4784ch03.fm
Great care should be taken to avoid virtual memory paging in the database machine. The database manages its memory with the assumption that it is never paged, and does not cooperate well should the operating system decide to swap some of its pages to disk.
68
4784ch03.fm
db2 connect to DBNAME db2 reorgchk update statistics on table all db2 connect reset db2rbind DBNAME all The REORGCHK and rebind should be executed when the system is relatively idle so that a stable sample might be acquired and to avoid possible deadlocks in the catalog tables. It is better to gather additional statistics, so consider also using the following command for every table requiring attention: runstats on table <schema>.<table> with distribution and detailed indexes
69
4784ch03.fm
Buffer pool page size is fixed at creation time and might be set to 4, 8, 16 or 32 KB. The most commonly used buffer pool is IBMDEFAULTBP which has a 4 KB page size. All buffer pools reside in database global memory, allocated on the database machine. The buffer pools must coexist with other data structures and applications, all without exhausting available memory. In general, having larger buffer pools improves performance up to a point by reducing I/O activity. Beyond that point, allocating additional memory no longer improves performance. DB2 V9.1 and later provide self tuning memory management, which includes managing buffer pool sizes. This is controlled globally by the self_tuning_mem database level parameter, which is on by default. Individual buffer pools can be enabled for self tuning using SIZE AUTOMATIC at CREATE or ALTER time. To choose appropriate buffer pool size settings manually, monitor database container I/O activity by using system tools or by using DB2 buffer pool snapshots. Be careful to avoid configuring large buffer pool size settings that lead to paging activity on the system.
70
4784ch03.fm
Increasing the primary log file size has implications for database recovery. Assuming a constant value for softmax, larger log files mean that recovery might take more time. The softmax parameter can be lowered to counter this, but keep in mind that more aggressive page cleaning might also be less efficient. Increasing the softmax parameter gives additional opportunities for write coalescing at the cost of longer recovery time. The default value softmax is 100, meaning that the database manager attempts to clean pages such that a single log file needs to be processed during recovery. For best performance, we recommend increasing this to 300, meaning that 3 log files might need processing during recovery: db2 update db config for yourDatabaseName using softmax 300
71
4784ch03.fm
enabled, CREATE TABLESPACE uses it by default (MANAGED BY AUTOMATIC STORAGE). For non-temporary tablespaces, REGULAR and LARGE, automatic storage is implemented using DMS on files. Before DB2 V9.5 the default caching strategy for tablespaces was FILE SYSTEM CACHING. In V9.5, this was changed to NO FILE SYSTEM CACHING for platforms where direct I/O or concurrent I/O is available. Taking defaults on V9.5 we now have a database with AUTOMATIC STORAGE YES, and a tablespace that is MANAGED BY AUTOMATIC STORAGE and in many cases NO FILE SYSTEM CACHING. Such a tablespace, which is implemented using DMS, does not cache LOBs in the buffer pool or the file system.
3.11.8 Bound the size of the catalog cache for clustered applications
The catalog cache is used to avoid repeating expensive activities, notably preparing execution plans for dynamic SQL. Thus it is important that the cache be sized appropriately.
72
4784ch03.fm
By default, several 4 KB pages of memory are allocated for each possible application as defined by the MAXAPPLS database parameter. The multiplier is 4 for DB2 9, and 5 for DB2 9.5 and beyond. MAXAPPLS is AUTOMATIC by default, and its value is adjusted to match the peak number of applications connected at runtime. When running clustered applications, such as those deployed in the BPEL Process Choreographer in IBM BPM 7.5.0, we have observed a value of more than 1000 for MAXAPPLS, meaning that at least 4000 pages would be allocated for the catalog cache given default tuning. For the same workload, 500 pages were sufficient: db2 update db config for yourDatabaseName using catalogcache_sz 500 The default behavior assumes heterogeneous use of database connections. A clustered application typically has more homogeneous use across connections, allowing a smaller package cache to be effective. Bounding the package cache size frees up memory for other more valuable uses. To tune the CATALOGCACHE_SZ database parameter manually, see the recommendations at the following website: http://publib.boulder.ibm.com/infocenter/db2luw/v9/topic/com.ibm.db2.udb.admin.doc /doc/r0000338.htm
73
4784ch03.fm
http://publib.boulder.ibm.com/infocenter/dmndhelp/v7r0mx/index.jsp?topic=/com.ibm. websphere.bpc.doc/doc/bpc/t5tuneint_spec_init_db_settings.html The following website discusses creating a DB2 for Linux, UNIX, and Windows database for Business Process Choreographer and gives details on BPEDB database creation, including pointers to useful creation scripts for a production environment: http://publib.boulder.ibm.com/infocenter/dmndhelp/v7r0mx/index.jsp?topic=/com.ibm. websphere.bpc.doc/doc/bpc/t2codbdb.html
74
4784ch03.fm
IBMs internal evaluation shows that a value of 30 seconds could be a good starting value; tune as necessary after setting this value. An example on how to set this parameter for the database MONITOR follows: db2 -v update db cfg for MONITOR using LOCKTIMEOUT 30
75
4784ch03.fm
For Oracle 10g R2: http://download.oracle.com/docs/cd/B19306_01/server.102/b14211/memory.htm#i29118 For Oracle 11g R1: http://download.oracle.com/docs/cd/B28359_01/server.111/b28274/memory.htm#i29118
4784ch03.fm
earlier releases. For brevity, only Java 6 tuning is discussed here. The following website is the IBM Java 6 Diagnostics Guide: http://publib.boulder.ibm.com/infocenter/javasdk/v6r0/index.jsp The guide discusses many more tuning parameters than those discussed in this paper, but most are for specific situations and are not of general use. For a more detailed description of IBM Java 6 garbage collection algorithms, see Memory Management in the chapter titled Understanding the IBM SDK for Java. Sun HotSpot JVM references: The following website provides a useful summary of HotSpot JVM options for Solaris: http://java.sun.com/docs/hotspot/VMOptions.html The following website provides a useful FAQ about the Solaris HotSpot JVM: http://java.sun.com/docs/hotspot/PerformanceFAQ.html#20 For more performance tuning information of Suns HotSpot JVM, consult the following website: http://java.sun.com/docs/performance/
<af type="tenured" id="12" timestamp="Fri Jan 18 15:46:15 2008" intervalms="86.539"> <minimum requested_bytes="3498704" /> <time exclusiveaccessms="0.103" /> <tenured freebytes="80200400" totalbytes="268435456" percent="29" > <soa freebytes="76787560" totalbytes="255013888" percent="30" /> <loa freebytes="3412840" totalbytes="13421568" percent="25" /> </tenured> <gc type="global" id="12" totalid="12" intervalms="87.124"> <refs_cleared soft="2" threshold="32" weak="0" phantom="0" /> <finalization objectsqueued="0" /> <timesms mark="242.029" sweep="14.348" compact="0.000" total="256.598" /> <tenured freebytes="95436688" totalbytes="268435456" percent="35" > <soa freebytes="87135192" totalbytes="252329472" percent="34" /> <loa freebytes="8301496" totalbytes="16105984" percent="51" /> </tenured> </gc> <tenured freebytes="91937984" totalbytes="268435456" percent="34" > <soa freebytes="87135192" totalbytes="252329472" percent="34" /> <loa freebytes="4802792" totalbytes="16105984" percent="29" /> </tenured> <time totalms="263.195" /> </af>
Example 3-4 Example Solaris HotSpot JVM verbosgc trace output (young and old)
77
4784ch03.fm
[Full GC 267628K 83769K <- live data (776768K), 1.8479984 secs] Sun HotSpot JVM verbosegc output can be more detailed by setting additional options: -XX:+PrintGCDetails -XX:+PrintGCTimeStamps It is tedious to parse the verbosegc output using a text editor. There are good visualization tools on the Web that can be used for more effective Java heap analysis. The IBM Pattern Modeling and Analysis Tool (PMAT) for Java Garbage Collector is one such tool. It is available for free download at IBM alphaWorks from the following website: http://www.alphaworks.ibm.com/tech/pmat PMAT supports the verbosegc output formats of JVMs offered by major JVM vendors such as IBM, Sun, and HP.
4784ch03.fm
high and the heap has grown to its maximum size, throughput might be improved by increasing the maximum heap size. As a rule of thumb, greater than 10% of the total time spent in GC is generally considered high. Increasing the maximum size of the Java heap might not always solve this type of problem as it is could be a memory over-usage problem. Conversely, if response times are too long due to GC pause times, decrease the heap size. If both problems are observed, an analysis of the application heap usage is required.
3.13.3 Setting the Heap Size when running multiple JVMs on one system
Each running Java program has a heap associated with it. Therefore, if you have a configuration where more than one Java program is running on a single physical system, setting the heap sizes appropriately is of particular importance. This is particularly true for 32 bit systems, where the total amount of addressable memory is limited. An example of one such configuration is when the IBM Integration Developer is on the same physical system as an IBM BPM Server utilizing a 32 bit JVM. Each of these is a separate Java program that has its own Java heap. If the sum of all of the virtual memory usage (including both Java Heaps as well as all other virtual memory allocations) exceeds the size of addressable physical memory, on the system, the Java heaps are subject to paging. This causes total system performance to degrade significantly. To minimize the possibility of this occurring, use the following guidelines: Collect a verbosegc trace for each running JVM. Based on the verbosegc trace output, set the initial heap size to a relatively low value. For example, assume that the verbosegc trace output shows that the heap size grows quickly to 256 MB, and then grows more slowly to 400 MB and stabilizes at that point. Based on this, set the initial heap size to 256 MB (-Xms256m). Based on the verbosegc trace output, set the maximum heap size appropriately. Care must be taken not to set this value too low, or Out Of Memory errors occur. The maximum heap size must be large enough to allow for peak throughput. Using the same example, a maximum heap size of 768 MB might be appropriate (-Xmx768m). This is to give the Java heap room to expand beyond its current size of 400 MB if required. The Java heap only grows if required (for example, if a period of peak activity drives a higher throughput rate), so setting the maximum heap size somewhat higher than current requirements is generally a good policy. Be careful not to set the heap sizes too low, or garbage collections will occur frequently, which might reduce throughput. Again, a verbosegc trace assists in determining this. A balance must be struck so that the heap sizes are large enough that garbage collections do not occur too often, while still ensuring that the heap sizes are not cumulatively so large as to cause the heap to page. This balancing act is configuration dependent.
79
4784ch03.fm
information). If these appear high, a subtle effect might be occurring whereby resources outside the heap are held by objects within the heap and being cleaned by finalizers. Reducing the size of the heap can alleviate this situation, by increasing the frequency with which finalizers are run. In addition, examine your application to determine if the finalizers can be avoided or minimized. OutOfMemory errors can also occur for issues unrelated to JVM heap usage, such as running out of certain system resources. Examples of this include insufficient file handles or thread stack sizes that are too small. In some cases, you can tune the configuration to avoid running out of native heap. Try reducing the stack size for threads (the -Xss parameter). Deeply nested methods might force a thread stack overflow if there is insufficient stack size. For middleware products, if you are using an in-process version of the JDBC driver, it is usually possible to find an out-of-process driver that can have a significant effect on the native memory requirements. For example, you can use type 4 JDBC drivers (DB2's Net drivers, Oracle's Thin drivers), MQSeries can be switched from Bindings mode to Client mode, and so on. See the documentation for the products in question for more details.
80
4784ch04.fm
Chapter 4.
81
4784ch04.fm
4.1.1 Three tier configuration with Web services and a remote DB2 system (BPEL business processes)
A three-tier configuration was used in our internal performance work to evaluate the performance of a BPEL business process that models automobile insurance claims processing. This configuration is an example of many production environments, where DB2 is on a separate system than the IBM BPM Server. The Web services binding was used for communications. The business process has two modes of operation: A BPEL microflow (straight through process) that processed claims where no human intervention is required. A BPEL microflow plus macroflow (long running process) pattern, where the macroflow is invoked when a review or approval is required (for example, if the claim amount is above a certain limit). Three systems were used in this configuration: Request driver IBM BPM 7.5.0 server DB2 database server The IBM BPM server and the DB2 database server required extensive tuning to maximize throughput. Some tuning varied due to the operating system (such as AIX and Windows) and the number of processor cores. We present these variations in tabular format after the common tuning: The following settings and configuration options are recommended for all topologies in this section: Use the production template. Define the Common database as local DB2 type 4. Establish BPEL Business Process support with bpeconfig.jacl (This sets the Data sources BPEDataSourceDb2 WebSphere Application Server data source properties statement cache to 300). Disable PMI. Set HTTP maxPersistentRequests to -1.
82
4784ch04.fm
Set GC policy to Xgcpolicy:gencon (see Table 4-1 and Table on page 84 for nursery setting Xmn). Use remote DB2 databases (connection type 4) for BPE, SIB System, and SIB BPC databases. Table 4-1 shows IBM BPM 7.5.0 server-related settings to modify from their default value when the IBM BPM 7.5.0 server is deployed on AIX.
Table 4-1 Three tier application cluster settings for AIX Setting Java Heap Megabytes Java nursery Megabytes Xmn Default Thread Pool Max BPEDB Data source connection pool max BPEDB Data source WebSphere Application Server data source properties Statement cache size BPC messaging engine data source connection pool max SCA SYSTEM messaging engine data source connection pool max IBM BPM Common Data source connection pool max J2C activation specifications SOABenchBPELMod2_AS Custom properties maxConcurrency, maxBatchSize Resources Asynchronous Beans Work Managers BPENavigationWorkManager Work request queue size, max threads, growable Application Cluster Business Flow Manager Message pool size, Intertransaction cache size WebContainer Thread Pool Min,Max com.ibm.websphere.webservices.http.maxConnection Value 1536 768 100 300 300 50 50 500 50, 400, 50, no 5000, 400 100, 100 50
Table 4-2 shows IBM BPM 7.5.0 server-related settings to modify from their default value when IBM BPM 7.5.0 server is deployed on Windows and Linux on Intel systems.
Table 4-2 Three tier Web service and remote DB2 tuning variations Windows and Linux on Intel systems Tuning Variations Microflow: Number of Cores 1 Java Heap Megabytes Java nursery Megabytes -Xmn Web Container Thread Pool Max Default Thread Pool Max BPE database connection pool max 1280 640 100 100 150 2 1280 640 150 200 250 4 1280 640 150 200 250 Macroflow: Number of Cores 1 1280 768 100 100 150 4 1280 768 300 200 350
83
4784ch04.fm
Tuning Variations
BPC messaging engine database connection pool max SYSTEM messaging engine database connection pool max Common database connection pool max J2C activation specifications SOABenchBPELMod2_AS Custom properties maxConcurrency BPEInternalActivationSpec batch size SOABenchBPELMod2_AS batch size Java custom property com.ibm.websphere.webservic es.http.maxConnection Application servers server1 Business Flow Manager allowPerformanceOptimizations Application servers server1 Business Flow Manager interTransactionCache.size Application servers server1 Business Flow Manager workManagerNavigation.messa gePoolSize Resources Asynchronous Beans Work Managers BPENavigationWorkManager min threads, max threads, request queue size
30 30 80 40
10 32 200
Yes
Yes
400
400
4000
4000
30, 30, 30
30, 30, 30
The DB2 database server has several databases defined for use by the IBM BPM 7.5.0 server. The database logs and tablespaces should be spread across a RAID array to distribute disk utilization. The SCA.SYSTEM.cellname.BUS database and the BPE database should be tuned as follows. The SCA.SYSTEM.cellname.BUS database should be tuned as follows: db2 update db cfg for sysdb using logbufsz 512 logfilsiz 8000 logprimary 20 logsecond 20 auto_runstats off db2 alter bufferpool ibmdefaultbp size 30000
84
4784ch04.fm
The BPE database should be created and tuned using the following DB2 commands and generated scripts:: db2 CREATE DATABASE bpedb ON /raid USING CODESET UTF-8 TERRITORY en-us
db2 update db cfg for bpedb using logbufsz 512 logfilsiz 10000 logprimary 20 logsecond 10 auto_runstats off Use the IBM BPM 7.5.0 server generated script: db2 -tf createTablespace.sql Use the IBM BPM 7.5.0 server generated script: db2 -tf createSchema.sql db2 alter bufferpool ibmdefaultbp size 132000 db2 alter bufferpool bpebp8k size 132000
4.1.2 Three tier configuration using Human Services with BPMN processes
A three-tier configuration was used in our internal performance work to evaluate the performance of a BPMN business process that models automobile insurance claims processing, using Human Services to process the claims with a Call Center scenario of Query Tasks, Claim Task, Complete Task, Commit Task. This configuration is an example of many production environments, where DB2 is on a separate system than the IBM BPM Server. The Web services Open SCA binding was used for communications. Three systems were used in this configuration: Request driver IBM BPM 7.5.0 server DB2 database server
85
4784ch04.fm
Create the indexes using the following commands (if using DB2; other databases have similar commands): db2 "CREATE INDEX IDX_SOAB_BPD_INSTANCE ON LSW_BPD_INSTANCE (SNAPSHOT_ID ASC, BPD_INSTANCE_ID ASC) ALLOW REVERSE SCANS COLLECT SAMPLED DETAILED STATISTICS db2 "CREATE INDEX IDX_SOAB_BPD_INSTANCE_VAR ON LSW_BPD_INSTANCE_VARIABLES (BPD_INSTANCE_ID ASC, VARIABLE_TYPE ASC, ALIAS ASC) ALLOW REVERSE SCANS COLLECT SAMPLED DETAILED STATISTICS"
4.1.3 Two tier configuration using file store for JMS for BPEL business processes
This configuration was used in our internal performance work to evaluate the performance of a long-running business process that models a typical mortgage application process. A two tier configuration is used, with the IBM BPM 7.5.0 server and DB2 on the same physical system, as is common for proofs of concept when limited hardware is available. This configuration is not a representative production configuration, however. The JMS binding is used for communication. In this configuration, the BPE uses a DB2 database, and the messaging engines are configured to use file stores. To select the file store option, start the Profile Management Tool, select Advanced Profile Creation, and, on the Database Configuration window, select Use a file store for Messaging Engines (MEs). Tuning parameter settings for the BPE database were initially derived using the DB2 Configuration Advisor. A few key parameter settings are modified further: MAXAPPLS, which must be large enough to accommodate connections from all possible JDBC Connection Pool threads. The default buffer pool sizes (number of 4 KB pages in IBMDEFAULTBP) for each database are set so that each pool is 256 MB in size. Table 4-3 shows the parameter settings recommended for this configuration.
Table 4-3 Two-tier configuration using JMS file store parameter settings Parameter names APP_CTL_HEAP_SZ APPGROUP_MEM_SZ CATALOGCACHE_SZ CHNGPGS_THRESH DBHEAP LOCKLIST LOCKTIMEOUT LOGBUFSZ LOGFILSIZ LOGPRIMARY LOGSECOND MAXAPPLS BPEDB settings 144 13001 521 55 600 500 30 245 1024 11 10 90
86
4784ch04.fm
Parameter names MAXLOCKS MINCOMMIT NUM_IOCLEANERS NUM_IOSERVERS PCKCACHESZ SOFTMAX SORTHEAP STMTHEAP DFT_DEGREE DFT_PREFETCH_SZ UTIL_HEAP_SZ IMBDEFAULTBP
In addition to these database-level parameter settings, several other parameters should also be modified using the administrative console. These settings primarily affect concurrency (thread settings): The amount of expected concurrency influences the size of the thread pool, because more in-flight transactions require more threads. For example, the size of the default thread pool might need to be increased beyond the default of 50 threads. The maximum concurrency is set to 50 threads for activation specifications. The database connection pool size for the BPEDB is increased to 60, and the statement cache size for the BPEDB is increased to 300. The Maximum Connections property for JMS connection pools is set to 40. Connectivity to the local database uses the DB2 JDBC Universal Driver Type 2 driver. Type 2 drivers produce better performance when the IBM BPM 7.5.0 server and DB2 are on the same physical system. IBM BPM 7.5.0 server JVM heap size is set to a fixed size of 1024 MB. In addition, the gencon garbage collection policy is used.
87
4784ch04.fm
If security is required, use application security instead of Java2 security to reduce overhead. Java Heap size is fixed at 1280 MB for Windows and 1280 MB for AIX. Gencon garbage collection policy enabled (-Xgcpolicy:gencon), setting the nursery heap size to 1024 MB.
88
4784bibl.fm
Related publications
The publications listed in this section are considered particularly suitable for a more detailed discussion of the topics covered in this paper.
IBM Redbooks
For information about ordering these publications, see How to get Redbooks on page 90. Note that some of the documents referenced here might be available in softcopy only. IBM Business Process Manager V7.5. Production Topologies, SG24-7976: http://www.redbooks.ibm.com/abstracts/sg247976.html
Online resources
These Web sites are also relevant as further information sources: WebSphere Application Server Performance URL http://www.ibm.com/software/webservers/appserv/was/performance.html WebSphere Application Server information center (including Tuning Guide) http://www-306.ibm.com/software/webservers/appserv/was/library/?S_CMP=rnav DB2 Version 9 best practices http://www.ibm.com/developerworks/data/bestpractices/?&S_TACT=105AGX11&S_CM DB2 Version 9.7 Info Center http://publib.boulder.ibm.com/infocenter/db2luw/v9r7/index.jsp IBM Java 6.0 Diagnostic Guide http://publib.boulder.ibm.com/infocenter/javasdk/v6r0/index.jsp The IBM Pattern Modeling and Analysis Tool (PMAT) for Java Garbage Collector http://www.alphaworks.ibm.com/tech/pmat Oracle 11g documentation library http://www.oracle.com/pls/db111/homepage IBM Integration Designer 7.5 Information Center http://publib.boulder.ibm.com/infocenter/esbsoa/wesbv7r5/topic/com.ibm.wbpm.wid .main.doc/welcome.html IBM Business Process Management 7.5 Information Center http://publib.boulder.ibm.com/infocenter/dmndhelp/v7r5mx/topic/com.ibm.wbpm.mai n.do.homepage-bpm.html Performance Tuning Resources for WPS and BPM solutions http://www.ibm.com/developerworks/websphere/library/techarticles/1111_herrmann/ 1111_herrmann.html
89
4784bibl.fm
DB2 Best Practices for Linux, UNIX, and Windows http://www.ibm.com/developerworks/data/bestpractices/?&S_TACT=105AGX11&S_CMP=FP DB2 Version 9.5 Info Center http://publib.boulder.ibm.com/infocenter/db2luw/v9r5/index.jsp Using JCA Adapters with WebSphere Process Server and WebSphere ESB http://www-128.ibm.com/developerworks/library/ws-soa-j2caadapter/index.html?ca= drsWebSphere ESB Support http://www-306.ibm.com/software/integration/wsesb/support/ Oracle Architecture and Tuning on AIX v1.31: http://www-03.ibm.com/support/techdocs/atsmastr.nsf/WebIndex/WP100883 Oracle 10g Release 2 documentation (includes a Performance Tuning Guide) http://www.oracle.com/pls/db102/homepage
90
Back cover
IBM Business Process Manager (BPM) 7.5 Performance Tuning and Best Practices
Redpaper
Learn valuable tips for tuning Get the latest best practices Try the example settings
This IBM Redpaper publication was produced by the IBM Business Process Manager (BPM) performance team. It provides performance tuning tips and best practices for IBM BPM 7.5 (all editions) and Business Monitor 7.5. These products represent an integrated development and runtime environment based on a key set of service-oriented architecture (SOA) and business process management (BPM) technologies: Service Component Architecture (SCA), Service Data Object (SDO), Business Process Execution Language for Web Services (BPEL), and Business Processing Modeling Notation (BPMN). This paper is aimed at a wide variety of groups, both within IBM (development, services, technical sales, and so forth) and customers. For those who are either considering or are in the early stages of implementing a solution incorporating these products, this document should prove a useful reference, both in terms of best practices during application development and deployment, and as a reference for setup, tuning, and configuration information. This paper provides a useful introduction to many of the issues influencing each product's performance, and can serve as a guide for making rational first choices in terms of configuration and performance settings. Similarly, those who have already implemented a solution using these products might use the information presented here to gain insight as to how their overall integrated solution performance might be improved. All of these products build on the core capabilities of the WebSphere Application Server infrastructure, so BPM solutions also benefit from tuning, configuration, and best practices information for WebSphere Application Server and the corresponding platform Java Virtual Machines (JVMs). Pointers to this information can be found in Related publications on page 89. The reader is encouraged to use this paper in conjunction with these references..
REDP-4784-00