• Save
BPEL PM 11g performance tuning  - 5
Upcoming SlideShare
Loading in...5
×

Like this? Share it with your network

Share

BPEL PM 11g performance tuning - 5

  • 1,841 views
Uploaded on

This is fifth chapter of Oracle Fusion Middleware BPEL PM 11g Performance Tuning. This chapter covers BPEL Engine tuning .

This is fifth chapter of Oracle Fusion Middleware BPEL PM 11g Performance Tuning. This chapter covers BPEL Engine tuning .

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
1,841
On Slideshare
1,841
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
0
Comments
0
Likes
4

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. 1
  • 2. Contents LOAD & PERFORMANCE TESTING .................................................... ERROR! BOOKMARK NOT DEFINED. 1 STRESS, LOAD, SOAK, SPIKE TESTS LOAD PROFILES ........................................ ERROR! BOOKMARK NOT DEFINED. 2 LNP TESTING LIFE CYCLE.......................................................................... ERROR! BOOKMARK NOT DEFINED. 3 EXAMPLES OF LNP TESTING OBJECTIVES ...................................................... ERROR! BOOKMARK NOT DEFINED. 3.1 RESPONSE TIME......................................................................................... ERROR! BOOKMARK NOT DEFINED. 3.2 RELIABILITY............................................................................................... ERROR! BOOKMARK NOT DEFINED. 3.3 CONFIGURATION SIZING .............................................................................. ERROR! BOOKMARK NOT DEFINED. 3.4 CAPACITY PLANNING .................................................................................. ERROR! BOOKMARK NOT DEFINED. 3.5 REGRESSION ............................................................................................. ERROR! BOOKMARK NOT DEFINED. 3.6 BOTTLENECK IDENTIFICATION ...................................................................... ERROR! BOOKMARK NOT DEFINED. 3.7 SCALABILITY .............................................................................................. ERROR! BOOKMARK NOT DEFINED. BPEL PM: INTRODUCTION ............................................................... ERROR! BOOKMARK NOT DEFINED. 1 BPEL PM PROCESS TYPES ....................................................................... ERROR! BOOKMARK NOT DEFINED. 1.1 BY INTERFACE ........................................................................................... ERROR! BOOKMARK NOT DEFINED. 1.2 BY DURABILITY .......................................................................................... ERROR! BOOKMARK NOT DEFINED. 2 TERMINOLOGY ...................................................................................... ERROR! BOOKMARK NOT DEFINED. 3 DIFFERENCE BETWEEN ASYNC & SYNC BPEL .............................................. ERROR! BOOKMARK NOT DEFINED. 4 SOA 11G CONFIGURATION FILES AND LOG FILES LOCATION ............................. ERROR! BOOKMARK NOT DEFINED. 5 DEFAULT DATA SOURCES ......................................................................... ERROR! BOOKMARK NOT DEFINED. 6 PERFORMANCE OBJECTIVE ....................................................................... ERROR! BOOKMARK NOT DEFINED. 7 WHAT TO TUNE .................................................................................... ERROR! BOOKMARK NOT DEFINED. 8 SYSTEM SETUP ...................................................................................... ERROR! BOOKMARK NOT DEFINED. 9 IMPORTANT POINTS ............................................................................... ERROR! BOOKMARK NOT DEFINED. 10 REFERENCE......................................................................................... ERROR! BOOKMARK NOT DEFINED. JVM TUNING ................................................................................... ERROR! BOOKMARK NOT DEFINED. 1 PAUSE TIMES AND THROUGHPUT .............................................................. ERROR! BOOKMARK NOT DEFINED. 1.1 GARBAGE COLLECTION VS. THROUGHPUT ...................................................... ERROR! BOOKMARK NOT DEFINED. 1.2 DEFRAGMENTATION PAUSES AND THROUGHPUT ............................................ ERROR! BOOKMARK NOT DEFINED. 2 PERFORMANCE AND MEMORY FOOTPRINT .................................................. ERROR! BOOKMARK NOT DEFINED. 3 JVM CHOICE ........................................................................................ ERROR! BOOKMARK NOT DEFINED. 4 JROCKIT’S TUNING ................................................................................. ERROR! BOOKMARK NOT DEFINED. 4.1 BOARDING INTO SHIP – STEP 1 .................................................................... ERROR! BOOKMARK NOT DEFINED. 4.1.1 Heap Size ............................................................................................ Error! Bookmark not defined. 4.1.2 Garbage Collection............................................................................. Error! Bookmark not defined. 4.1.3 Nursery Size ...................................................................................... Error! Bookmark not defined. 2
  • 3. 4.1.4 Pause Target ...................................................................................... Error! Bookmark not defined. 4.2 LEAVING THE SHORE – STEP 2 ...................................................................... ERROR! BOOKMARK NOT DEFINED. 4.2.1 Lazy Unlocking ................................................................................... Error! Bookmark not defined. 4.2.2 Call Profiling ....................................................................................... Error! Bookmark not defined. 4.2.3 Large Pages ........................................................................................ Error! Bookmark not defined. 4.3 IN THE HIGH SEAS – STEP 3 ......................................................................... ERROR! BOOKMARK NOT DEFINED. 4.3.1 Compaction ........................................................................................ Error! Bookmark not defined. 4.3.2 Thread Local Area size ....................................................................... Error! Bookmark not defined. 5 HOTSPOT’S TUNING ............................................................................... ERROR! BOOKMARK NOT DEFINED. 5.1 GARBAGE COLLECTION STRATEGIES .............................................................. ERROR! BOOKMARK NOT DEFINED. 5.1.1 Serial GC Strategy .............................................................................. Error! Bookmark not defined. 5.1.2 Parallel GC Strategy ........................................................................... Error! Bookmark not defined. 5.1.3 Parallel GC strategy ............................................................................ Error! Bookmark not defined. 6 WHERE TO SPECIFY JVM AND ITS PARAMETERS ............................................ ERROR! BOOKMARK NOT DEFINED. 7 OUTOFMEMORYERROR .......................................................................... ERROR! BOOKMARK NOT DEFINED. 7.1 JAVA.LANG.OUTOFMEMORYERROR: JAVA HEAP SPACE ................................... ERROR! BOOKMARK NOT DEFINED. 7.2 JAVA.LANG.OUTOFMEMORYERROR: PERMGEN SPACE .................................... ERROR! BOOKMARK NOT DEFINED. 7.3 JAVA.LANG.OUTOFMEMORYERROR: UNABLE TO CREATE NEW NATIVE THREAD.... ERROR! BOOKMARK NOT DEFINED. 7.4 JAVA.LANG.OUTOFMEMORYERROR: REQUESTED XXX BYTES FOR CHUNKPOOL::ALLOCATE. OUT OF SWAP SPACE ERROR! BOOKMARK NOT DEFINED. 7.5 ANALYSIS ................................................................................................. ERROR! BOOKMARK NOT DEFINED. 8 REFERENCE .......................................................................................... ERROR! BOOKMARK NOT DEFINED. WEBLOGIC SERVER TUNING ............................................................ ERROR! BOOKMARK NOT DEFINED. 1 THREAD MANAGEMENT/WORK MANAGER ................................................. ERROR! BOOKMARK NOT DEFINED. 1.1 REQUEST CLASSES ..................................................................................... ERROR! BOOKMARK NOT DEFINED. 1.2 CONSTRAINTS ........................................................................................... ERROR! BOOKMARK NOT DEFINED. 1.3 WORK MANGER TYPES............................................................................... ERROR! BOOKMARK NOT DEFINED. 1.3.1 Default Thread Pool ........................................................................... Error! Bookmark not defined. 1.3.2 SOAWorkManager ............................................................................. Error! Bookmark not defined. 2 NETWORK I/O ...................................................................................... ERROR! BOOKMARK NOT DEFINED. 2.1 MUXERS .................................................................................................. ERROR! BOOKMARK NOT DEFINED. 2.2 CHUNK PARAMETERS ................................................................................. ERROR! BOOKMARK NOT DEFINED. 2.3 CONNECTION BACKLOG BUFFERING .............................................................. ERROR! BOOKMARK NOT DEFINED. 2.4 CACHED CONNECTIONS .............................................................................. ERROR! BOOKMARK NOT DEFINED. 3 TUNING DATA SOURCE CONNECTION POOLS ................................................ ERROR! BOOKMARK NOT DEFINED. 3.1 STATEMENT CACHE .................................................................................... ERROR! BOOKMARK NOT DEFINED. 3.1.1 Usage Restrictions for Statement Cache ........................................... Error! Bookmark not defined. 3.2 CONNECTION TESTING OPTIONS FOR A DATA SOURCE ..................................... ERROR! BOOKMARK NOT DEFINED. 3.2.1 Automatic Testing .............................................................................. Error! Bookmark not defined. 3.3 ENABLING CONNECTION CREATION RETRIES................................................... ERROR! BOOKMARK NOT DEFINED. 3.4 ENABLING CONNECTION REQUESTS TO WAIT FOR A CONNECTION ..................... ERROR! BOOKMARK NOT DEFINED. 3
  • 4. 3.5 XA TRANSACTION TIMEOUT ........................................................................ ERROR! BOOKMARK NOT DEFINED. 3.6 AUTOMATICALLY RECOVERING LEAKED CONNECTIONS ..................................... ERROR! BOOKMARK NOT DEFINED. 3.7 LIMITING STATEMENT PROCESSING TIME ...................................................... ERROR! BOOKMARK NOT DEFINED. 3.8 PINNED TO THREAD PROPERTY .................................................................... ERROR! BOOKMARK NOT DEFINED. 3.9 GRIDLINK ................................................................................................. ERROR! BOOKMARK NOT DEFINED. 3.10 SINGLE CLIENT ACCESS NAME.................................................................... ERROR! BOOKMARK NOT DEFINED. 3.11 LOGGING LAST RESOURCE ......................................................................... ERROR! BOOKMARK NOT DEFINED. 4 DATABASE MODE .................................................................................. ERROR! BOOKMARK NOT DEFINED. 5 REFERENCE .......................................................................................... ERROR! BOOKMARK NOT DEFINED. BPEL ENGINE TUNING ...................................................................................................................... 16 1 REAL TIME VIEWING OF PERFORMANCE METRICS ................................................................................... 16 1.1 FUSION MIDDDLEWARE CONTROL ............................................................................................................. 16 1.2 DYNAMIC MEMORY SERVICE .................................................................................................................... 19 2 BPEL ENGINE THREADING MODEL...................................................................................................... 20 2.1 DISPATCHER MAXIMUM REQUEST DEPTH................................................................................................... 22 2.2 INVOKEMESSAGES IN CACHE .................................................................................................................... 23 3 TRANSACTION TIMEOUT ................................................................................................................... 24 3.1 SYNCMAXWAITTIME .............................................................................................................................. 24 3.2 BPEL EJBS ............................................................................................................................................ 27 3.3 GLOBAL TRANSACTION TIMEOUT AT WEBLOGIC DOMAIN LEVEL ..................................................................... 30 3.4 WEBSERVICE READ AND CONNECTION TIMEOUT .......................................................................................... 31 3.5 RELATIONSHIP AMONG TIMEOUT PARAMETERS ........................................................................................... 32 3.6 WLS TIMEOUT PARAMETERS .................................................................................................................... 32 3.6.1 Complete Message Timeout ........................................................................................................... 35 3.6.2 Idle Connection Timeout: ............................................................................................................... 35 3.6.3 Tunneling Client Timeout................................................................................................................ 36 3.6.4 Post Timeout ................................................................................................................................... 38 3.6.5 Duration .......................................................................................................................................... 38 3.6.6 Tunneling Client Timeout................................................................................................................ 39 4 BPEL PM AUDIT AND LOGGING ......................................................................................................... 39 4.1 AUDIT TUNING ....................................................................................................................................... 39 4.1.1 SOA Infrastructure level .................................................................................................................. 39 4.1.2 BPEL Engine Level ........................................................................................................................... 46 4.1.3 AuditStorePolicy ............................................................................................................................. 48 4.1.4 AuditFlushByteThreshold................................................................................................................ 49 4.1.5 AuditFlushEventThreshold .............................................................................................................. 49 4.1.6 AsyncAuditPersisterThreads ........................................................................................................... 50 4.1.7 AsyncAuditQueueSize ..................................................................................................................... 50 4.2 LOGGING TUNING................................................................................................................................... 50 5 BPEL ENGINE DATABASE SCHEMA ...................................................................................................... 53 5.1 TWO SCHEMAS ...................................................................................................................................... 53 4
  • 5. 5.2 PURGE .................................................................................................................................................. 66 5.3 PARTITIONING........................................................................................................................................ 66 5.3.1 Partial Partitioning .......................................................................................................................... 67 5.3.2 Complete Partitioning ..................................................................................................................... 68 6 MDS SCHEMA TUNING .................................................................................................................... 68 6.1 PURGING .............................................................................................................................................. 70 6.2 STATISTIC COLLECTION ............................................................................................................................ 71 6.3 OPTIMIZING PATH_FULLNAME TABLE ........................................................................................................ 71 7 TECHNOLOGY ADAPTERS .................................................................................................................. 72 7.1 FILE AND FTP ADAPTER ........................................................................................................................... 72 7.1.1 Threads ........................................................................................................................................... 72 7.1.2 Inbound Throttling .......................................................................................................................... 73 7.1.3 Outbound Throttling ....................................................................................................................... 74 7.1.4 Outbound Performance Best Practices........................................................................................... 75 7.1.5 Tuning number of files to be processed at a time .......................................................................... 77 7.2 DATABASE ADAPTER ............................................................................................................................... 77 7.2.1 Basic considerations ....................................................................................................................... 77 7.2.2 Existence Checking.......................................................................................................................... 80 7.2.3 Throttling ........................................................................................................................................ 80 7.2.4 Adapter Threads ............................................................................................................................. 81 7.3 JMS ADAPTER ....................................................................................................................................... 82 7.3.1 Receive Threads .............................................................................................................................. 82 7.4 AQ ADAPTER ......................................................................................................................................... 83 7.4.1 Dequeue Threads ............................................................................................................................ 83 7.4.2 Dequeue Threads and Number of database connection................................................................ 83 7.5 MQ ADAPTER ........................................................................................................................................ 83 7.5.1 Dequeue Threads ............................................................................................................................ 83 7.6 SOCKET ADAPTER ................................................................................................................................... 84 8 BPEL PM – MISCELLANEOUS PROPERTIES ............................................................................................ 84 8.1 INSTANCE KEY BLOCK SIZE........................................................................................................................ 84 8.2 AUTOMATIC RECOVERY ATTEMPTS ............................................................................................................ 84 8.3 DISABLE BPEL MONITORS AND SENSORS ................................................................................................... 85 9 BEST PRACTICES: BPEL PROCESS/COMPOSITE/COMPONENT...................................................................... 85 9.1 LARGE PAYLOADS ................................................................................................................................... 85 9.2 PERSIST ONLY THE FAULTED BPEL INSTANCES.............................................................................................. 87 9.3 DO NOT VALIDATE INCOMING XML ........................................................................................................... 87 9.4 IDEMPOTENENCY .................................................................................................................................... 88 9.5 NONBLOCKINGINVOKE............................................................................................................................. 89 10 DATABASE TUNING ....................................................................................................................... 89 10.1 INITIALIZATION PARAMETERS .................................................................................................................. 89 10.2 HUGE PAGES ....................................................................................................................................... 92 10.3 DB CONTENTION.................................................................................................................................. 93 10.3.1 Wait events ................................................................................................................................... 93 5
  • 6. 10.4 SECUREFILES........................................................................................................................................ 96 10.4.1 Enable SecureFiles for SOAINFRA schema .................................................................................... 97 10.4.2 Enabling Encryption .................................................................................................................... 101 10.5 SQL PLAN ......................................................................................................................................... 103 11 REFERENCE................................................................................................................................ 103 EM FUSION MIDDLEWARE CONTROL AND WLS ADMIN CONSOLE..... ERROR! BOOKMARK NOT DEFINED. 1 2 3 4 5 6 7 8 9 10 11 12 STUCK THREAD MAX TIME....................................................................... ERROR! BOOKMARK NOT DEFINED. STUCK THREAD TIMER INTERVAL ............................................................... ERROR! BOOKMARK NOT DEFINED. TUNE DUMP CONFIGURATION ................................................................... ERROR! BOOKMARK NOT DEFINED. DATA DISPLAY OPTION FOR EM CONSOLE ................................................... ERROR! BOOKMARK NOT DEFINED. CACHE TIMEOUT FOR DISCOVERY ............................................................... ERROR! BOOKMARK NOT DEFINED. PERMSIZE OF ADMIN SERVER ................................................................... ERROR! BOOKMARK NOT DEFINED. DMS’S FREQUENCY................................................................................ ERROR! BOOKMARK NOT DEFINED. UN-TARGET DMS FROM SERVERS ............................................................. ERROR! BOOKMARK NOT DEFINED. BPEL RECOVERY CONSOLE OPTION ............................................................. ERROR! BOOKMARK NOT DEFINED. INDEX CREATION.................................................................................. ERROR! BOOKMARK NOT DEFINED. DB MANUAL STATS COLLECTION ............................................................. ERROR! BOOKMARK NOT DEFINED. REFERENCE......................................................................................... ERROR! BOOKMARK NOT DEFINED. DATA COLLECTION .......................................................................... ERROR! BOOKMARK NOT DEFINED. 1 BEFORE LNP TEST .................................................................................. ERROR! BOOKMARK NOT DEFINED. 1.1 INFRASTRUCTURE ...................................................................................... ERROR! BOOKMARK NOT DEFINED. 1.2 JVM-HOTSPOT-<<MANAGEDSERVER>> AND JVM-JROCKIT-<<MANAGEDSERVER>> ....... ERROR! BOOKMARK NOT DEFINED. 1.3 WLS-THREADING-<<MANAGEDSERVER>> ................................................... ERROR! BOOKMARK NOT DEFINED. 1.4 WLS-NETWORKIO-<<MANAGEDSERVER>> .................................................. ERROR! BOOKMARK NOT DEFINED. 1.5 WLS-DATASOURCE-<<MANAGEDSERVER>>................................................. ERROR! BOOKMARK NOT DEFINED. 1.6 BPEL PM-<<MANAGEDSERVER>> .............................................................. ERROR! BOOKMARK NOT DEFINED. 1.7 TECHNOLOGY ADAPTERS............................................................................. ERROR! BOOKMARK NOT DEFINED. 1.8 BPEL PM – COMPOSITE ............................................................................ ERROR! BOOKMARK NOT DEFINED. 1.9 DATABASE ................................................................................................ ERROR! BOOKMARK NOT DEFINED. 2 DURING LNP TEST ................................................................................. ERROR! BOOKMARK NOT DEFINED. 2.1 CPU AND RAM USAGE AND MEMORY AVAILABILITY ........................................ ERROR! BOOKMARK NOT DEFINED. 2.2 JVM’S HEAP USAGE, GARBAGE COLLECTION AND ANY MEMORY LEAK IF ANY ........ ERROR! BOOKMARK NOT DEFINED. 2.3 DATABASE CONNECTIONS AVAILABILITY AND USAGE ........................................ ERROR! BOOKMARK NOT DEFINED. 2.4 AVAILABILITY OF PERIPHERAL RESOURCES LIKE JMS QUEUES, AQ AND THEIR USAGE PATTERN .... ERROR! BOOKMARK NOT DEFINED. 3 AFTER LNP TEST .................................................................................... ERROR! BOOKMARK NOT DEFINED. 3.1 GET FULL DUMP OF FEW IMPORTANT TABLES.................................................. ERROR! BOOKMARK NOT DEFINED. 3.2 EXECUTE SQL QUERIES AS AND WHEN REQUIRED ............................................ ERROR! BOOKMARK NOT DEFINED. 6
  • 7. 3.3 ANALYSIS OF AWR REPORT ........................................................................ ERROR! BOOKMARK NOT DEFINED. 3.4 ANALYSIS OF SOA SERVER MEMORY USAGE ................................................... ERROR! BOOKMARK NOT DEFINED. 4 REFERENCE .......................................................................................... ERROR! BOOKMARK NOT DEFINED. LNP TEST CASE DESIGN AND LOAD TEST SELECTION ......................... ERROR! BOOKMARK NOT DEFINED. 1 LNP TEST CASE DESIGN ........................................................................... ERROR! BOOKMARK NOT DEFINED. 2 DESIGN OF EXPERIMENT .......................................................................... ERROR! BOOKMARK NOT DEFINED. 3 REFERENCE .......................................................................................... ERROR! BOOKMARK NOT DEFINED. APPENDIX A: WEBLOGIC SERVER OVERVIEW ................................... ERROR! BOOKMARK NOT DEFINED. 1 2 3 4 5 6 7 8 9 WLS CONFIGURATION ............................................................................ ERROR! BOOKMARK NOT DEFINED. DOMAIN ............................................................................................. ERROR! BOOKMARK NOT DEFINED. SERVER ............................................................................................... ERROR! BOOKMARK NOT DEFINED. ADMINISTRATION SERVER ....................................................................... ERROR! BOOKMARK NOT DEFINED. MANAGED SERVER ................................................................................ ERROR! BOOKMARK NOT DEFINED. ADMINISTRATION SERVER TO MANAGED SERVER INTERACTION ........................ ERROR! BOOKMARK NOT DEFINED. CLUSTER .............................................................................................. ERROR! BOOKMARK NOT DEFINED. NODE MANAGER................................................................................... ERROR! BOOKMARK NOT DEFINED. MACHINE ............................................................................................ ERROR! BOOKMARK NOT DEFINED. APPENDIX B: AUDITING IN BPEL PM ................................................ ERROR! BOOKMARK NOT DEFINED. 1 AUDIT LEVELS ....................................................................................... ERROR! BOOKMARK NOT DEFINED. 2 ORDER OF PRECEDENCE FOR AUDIT LEVEL SETTINGS ........................................ ERROR! BOOKMARK NOT DEFINED. APPENDIX C: ANTI PATTERNS .......................................................... ERROR! BOOKMARK NOT DEFINED. 1 2 3 4 5 6 7 8 9 10 SYNCHRONOUS – ASYNCHRONOUS ............................................................ ERROR! BOOKMARK NOT DEFINED. OVER USE OF ASYNCHRONOUS PROCESSES ................................................... ERROR! BOOKMARK NOT DEFINED. OVER USE OF DURABLE PROCESSES ............................................................. ERROR! BOOKMARK NOT DEFINED. NO FAULT HANDLING ............................................................................. ERROR! BOOKMARK NOT DEFINED. SYNCHRONOUS FAULT HANDLING .............................................................. ERROR! BOOKMARK NOT DEFINED. TO MANY RETRIES .................................................................................. ERROR! BOOKMARK NOT DEFINED. CHATTING BPEL PROCESS (CALL BACK) ....................................................... ERROR! BOOKMARK NOT DEFINED. OVER USE OF FLOWN ............................................................................. ERROR! BOOKMARK NOT DEFINED. LOOPS AND MORE LOOPS......................................................................... ERROR! BOOKMARK NOT DEFINED. SYNCHRONOUS AND ASYNCHRONOUS PROCESSES ON SAME MANAGED SERVER/CLUSTER ... ERROR! BOOKMARK NOT DEFINED. 11 DURABLE AND TRANSIENT PROCESSES ON SAME MANAGED SERVER/CLUSTER...... ERROR! BOOKMARK NOT DEFINED. 12 STICKY LOAD BALANCER ......................................................................... ERROR! BOOKMARK NOT DEFINED. 7
  • 8. 13 NOT KEEPING ASPECT RATIO ................................................................... ERROR! BOOKMARK NOT DEFINED. APPENDIX D: SQL QUERIES .............................................................. ERROR! BOOKMARK NOT DEFINED. 1 EM CONSOLE SQL QUERIES ..................................................................... ERROR! BOOKMARK NOT DEFINED. 1.1 RECOVERY CONSOLE QUERIES ...................................................................... ERROR! BOOKMARK NOT DEFINED. 1.2 RECENT FAULT AND REJECTED MESSAGES QUERY ............................................. ERROR! BOOKMARK NOT DEFINED. 1.3 RECENT COMPOSITE INSTANCE QUERY........................................................... ERROR! BOOKMARK NOT DEFINED. 1.4 INSTANCE TAB PAGE QUERY ......................................................................... ERROR! BOOKMARK NOT DEFINED. 1.5 INSTANCE TAB PAGE SEARCH QUERY BASED ON NAME VS TITLE QUERY ................ ERROR! BOOKMARK NOT DEFINED. 1.6 FAULT AND REJECTED MESSAGE TAB PAGE QUERIES ......................................... ERROR! BOOKMARK NOT DEFINED. 1.6.1 Parent query ...................................................................................... Error! Bookmark not defined. 1.6.2 Child query ......................................................................................... Error! Bookmark not defined. 2 MISCELLANEOUS ................................................................................... ERROR! BOOKMARK NOT DEFINED. 2.1 STORED PROCEDURE TO CONVERT BLOB IN STRING .......................................... ERROR! BOOKMARK NOT DEFINED. 2.2 QUERY TO FIND PERCENTAGE OF FREE SPACE .................................................. ERROR! BOOKMARK NOT DEFINED. 2.3 QUERY TO FIND THE WAIT EVENTS FOR LGWR USING ITS SID ........................... ERROR! BOOKMARK NOT DEFINED. 2.4 QUERY TO MONITOR ‘REDO BUFFER ALLOCATION RETRIES’................................ ERROR! BOOKMARK NOT DEFINED. 2.5 SQL STATEMENT TO RECLAIM SPACE AFTER PURGING....................................... ERROR! BOOKMARK NOT DEFINED. 2.6 QUERY TO FIND OUT TOTAL SESSIONS ON A DATABASE ..................................... ERROR! BOOKMARK NOT DEFINED. 2.7 QUERY TO FIND OUT UTILIZATION OF PROCESSES AND SESSIONS IN A DATABASE ... ERROR! BOOKMARK NOT DEFINED. 2.8 FIND OUT THE PROCESS INSTANCE FROM A CONVERSATION ID WHEN THERE IS NO INSTANCE NUMBER SHOWING IN THE LOG FILE (BPEL INSTANCE ID FOR A TIMES OUT ITEM) ....................................... ERROR! BOOKMARK NOT DEFINED. 2.9 QUERY TO GET AUDIT DETAILS FROM AUDIT_DETAILS TABLE .............................. ERROR! BOOKMARK NOT DEFINED. 2.10 QUERY TO GET AUDIT DETAILS FROM AUDIT_TRAIL TABLE ............................... ERROR! BOOKMARK NOT DEFINED. 2.11 QUERY TO GET XML MESSAGE WITH THE GIVEN INSTANCE ID ......................... ERROR! BOOKMARK NOT DEFINED. 2.12 QUERY TO GET XML MESSAGE WITH A GIVEN INSTANCE NAME........................ ERROR! BOOKMARK NOT DEFINED. 2.13 QUERY TO GET PAYLOAD SIZE OF MESSAGE ................................................... ERROR! BOOKMARK NOT DEFINED. 2.14 QUERY TO GET EXECUTION TIME OF BPEL INSTANCES .................................... ERROR! BOOKMARK NOT DEFINED. 2.15 QUERY TO GET THE EXECUTION TIME OF BPEL INSTANCES AND TO FIND THE PARENT THAT HAS INITIALIZED THE COMPOSITE ....................................................................................................... ERROR! BOOKMARK NOT DEFINED. 2.16 QUERY TO IDENTIFY ALL THE FAULTS FOR THE MESSAGES THAT WERE SITTING IN BPEL ENGINE LEVEL RECOVERY AS UNDELIVERED INVOKES ........................................................................................ ERROR! BOOKMARK NOT DEFINED. APPENDIX E: BIG OR LARGE OR HUGE PAGES ................................... ERROR! BOOKMARK NOT DEFINED. 1 2 3 4 LINUX ................................................................................................. ERROR! BOOKMARK NOT DEFINED. WINDOWS ........................................................................................... ERROR! BOOKMARK NOT DEFINED. SOLARIS .............................................................................................. ERROR! BOOKMARK NOT DEFINED. REFERENCE: ......................................................................................... ERROR! BOOKMARK NOT DEFINED. APPENDIX F: ORA-01438: VALUE LARGER THAN SPECIFIED PRECISION ALLOWED .... ERROR! BOOKMARK NOT DEFINED. 8
  • 9. 5 6 7 8 WHAT IS THE ERROR IN LOGS? .................................................................. ERROR! BOOKMARK NOT DEFINED. EFFECTS............................................................................................... ERROR! BOOKMARK NOT DEFINED. CAUSE ................................................................................................ ERROR! BOOKMARK NOT DEFINED. SOLUTION ............................................................................................ ERROR! BOOKMARK NOT DEFINED. APPENDIX G: LOBS IN THE SOAINFRA SCHEMA ................................ ERROR! BOOKMARK NOT DEFINED. APPENDIX H: AWR, ADDM, & ASH REPORTS .................................... ERROR! BOOKMARK NOT DEFINED. 1 AWR REPORT ...................................................................................... ERROR! BOOKMARK NOT DEFINED. 2 ADDM REPORT .................................................................................... ERROR! BOOKMARK NOT DEFINED. 3 ASH REPORT ........................................................................................ ERROR! BOOKMARK NOT DEFINED. 4 AWR REPORT ANALYSIS ......................................................................... ERROR! BOOKMARK NOT DEFINED. 4.1 SQL STATEMENTS ORDERED BY ELAPSED TIME ............................................... ERROR! BOOKMARK NOT DEFINED. 4.2 SQL STATEMENTS ORDERED BY CPU TIME..................................................... ERROR! BOOKMARK NOT DEFINED. 4.3 SQL STATEMENTS ORDERED BY GETS ............................................................ ERROR! BOOKMARK NOT DEFINED. 4.4 SQL STATEMENTS ORDERED BY READS .......................................................... ERROR! BOOKMARK NOT DEFINED. 4.5 SQL STATEMENTS ORDERED BY EXECUTIONS .................................................. ERROR! BOOKMARK NOT DEFINED. 4.6 SQL STATEMENTS ORDERED BY PARSE CALLS ................................................. ERROR! BOOKMARK NOT DEFINED. 5 REFERENCE .......................................................................................... ERROR! BOOKMARK NOT DEFINED. APPENDIX I: MONITORING SCRIPTS ................................................. ERROR! BOOKMARK NOT DEFINED. 1 DATABASE MONITORING ......................................................................... ERROR! BOOKMARK NOT DEFINED. 2 JMS MONITORING ................................................................................ ERROR! BOOKMARK NOT DEFINED. 3 AQ MONITORING .................................................................................. ERROR! BOOKMARK NOT DEFINED. APPENDIX J: HOW TO MONITOR SOA SERVER MEMORY USAGE ....... ERROR! BOOKMARK NOT DEFINED. 1 2 3 4 SETUP: JCONSOLE OR VISUALVM (INSTALLED LOCALLY)................................... ERROR! BOOKMARK NOT DEFINED. SETUP: JVISUALVM (INSTALLED AT REMOTE MACHINE) ................................... ERROR! BOOKMARK NOT DEFINED. SETUP: JROCKIT MISSION CONTROL (INSTALLED AT REMOTE MACHINE) .............. ERROR! BOOKMARK NOT DEFINED. REFERENCE .......................................................................................... ERROR! BOOKMARK NOT DEFINED. APPENDIX K: HEAP DUMP FILES ANALYSIS: JROCKIT AND HOTSPOT JVMS ....... ERROR! BOOKMARK NOT DEFINED. 1 EXAMPLE ANALYSIS OF A HEAP DUMP FILE USING ECLIPSE MEMORY ANALYZER ... ERROR! BOOKMARK NOT DEFINED. 2 REFERENCE .......................................................................................... ERROR! BOOKMARK NOT DEFINED. APPENDIX L: CAPACITY PLANNING................................................... ERROR! BOOKMARK NOT DEFINED. 9
  • 10. 1 CAPACITY PLANNING FOR BPEL PM .......................................................... ERROR! BOOKMARK NOT DEFINED. 1.1 DETERMINING PERFORMANCE GOALS AND OBJECTIVES – CURRENT & FUTURE.... ERROR! BOOKMARK NOT DEFINED. 1.2 MEASURING PERFORMANCE METRICS .......................................................... ERROR! BOOKMARK NOT DEFINED. 1.3 IDENTIFYING BOTTLENECKS ......................................................................... ERROR! BOOKMARK NOT DEFINED. 1.4 IMPLEMENTING A CAPACITY MANAGEMENT PLAN .......................................... ERROR! BOOKMARK NOT DEFINED. 2 REFERENCE .......................................................................................... ERROR! BOOKMARK NOT DEFINED. Exhibits Exhibit 1: Stress, Load, Soak, Spike Tests Load Profiles ................... Error! Bookmark not defined. Exhibit 2: LnP Testing Life Cycle and SDLC ....................................... Error! Bookmark not defined. Exhibit 3: BPEL Processes ................................................................. Error! Bookmark not defined. Exhibit 4: JVM Tuning Tradeoffs ...................................................... Error! Bookmark not defined. Exhibit 5: JVM's Garbage Collection and Throughput ..................... Error! Bookmark not defined. Exhibit 6: jRockit Attributes ............................................................. Error! Bookmark not defined. Exhibit 7: HostSpot Attributes ......................................................... Error! Bookmark not defined. Exhibit 8: WLS internal applications at startup - 1 ......................... Error! Bookmark not defined. Exhibit 9: WLS internal applications at startup - 2 ......................... Error! Bookmark not defined. Exhibit 10: WLS internal applications at startup - 3 ....................... Error! Bookmark not defined. Exhibit 11: WLS internal applications at startup - 4 ........................ Error! Bookmark not defined. Exhibit 12: WLS internal applications at startup - 5 ........................ Error! Bookmark not defined. Exhibit 13: WLS internal applications at startup - 6 ........................ Error! Bookmark not defined. Exhibit 14: SOAWorkManager - 1 .................................................... Error! Bookmark not defined. Exhibit 15: SOAWorkManager - 2 .................................................... Error! Bookmark not defined. Exhibit 16: SOAWorkManager - 3 .................................................... Error! Bookmark not defined. Exhibit 17: WLS Muxers ................................................................... Error! Bookmark not defined. Exhibit 18: FMC Login.................................................................................................................... 17 Exhibit 19: FMC Farm Summary.................................................................................................... 17 Exhibit 20: FMC Performance Summary - 1 .................................................................................. 18 Exhibit 21: FMC Performance Summary - 2 .................................................................................. 19 Exhibit 22: FMC Performance Summary - 3 .................................................................................. 19 Exhibit 23: Dynamic Memory Service ........................................................................................... 20 Exhibit 24: BPEL Engine Threading Model .................................................................................... 21 Exhibit 25: Dispatcher Maximum Request Depth - 1.................................................................... 22 Exhibit 26: Dispatcher Maximum Request Depth - 2.................................................................... 23 Exhibit 27: InvokeMessages In Cache ........................................................................................... 23 Exhibit 28: syncMaxWaitTime - 1 ................................................................................................. 25 Exhibit 29: syncMaxWaitTime - 2 ................................................................................................. 25 Exhibit 30: syncMaxWaitTime - 3 ................................................................................................. 26 Exhibit 31: syncMaxWaitTime – 4 ................................................................................................. 26 Exhibit 32: BPEL EJBs - 1 ................................................................................................................ 27 10
  • 11. Exhibit 33: BPEL EJBs - 2 ................................................................................................................ 28 Exhibit 34: BPEL EJBs - 3 ................................................................................................................ 29 Exhibit 35: Global transaction timeout at WLS Domain Level - 1 ................................................. 30 Exhibit 36: Global transaction timeout at WLS Domain Level - 2 ................................................. 31 Exhibit 37: WLS Timeout parameters - 1 ...................................................................................... 33 Exhibit 38: WLS Timeout parameters - 2 ...................................................................................... 34 Exhibit 39: WLS Timeout parameters - 3 ...................................................................................... 35 Exhibit 40: Tunneling Client Timeout - 1....................................................................................... 36 Exhibit 41: Tunneling Client Timeout - 2....................................................................................... 37 Exhibit 42: Tunneling Client Timeout - 3....................................................................................... 38 Exhibit 43: SOA Infrastructure level audit tuning - 1 .................................................................... 40 Exhibit 44: SOA Infrastructure level audit tuning - 2 .................................................................... 41 Exhibit 45: AuditConfig - 1 ............................................................................................................ 43 Exhibit 46: AuditConfig - 2 ............................................................................................................ 44 Exhibit 47: AuditConfig - 3 ............................................................................................................ 44 Exhibit 48: AuditConfig - 4 ............................................................................................................ 45 Exhibit 49: AuditConfig - 5 ............................................................................................................ 45 Exhibit 50: Payload Validation - 1 ................................................................................................. 47 Exhibit 51: Payload Validation - 2 ................................................................................................. 48 Exhibit 52: AuditStorePolicy - 1 .................................................................................................... 49 Exhibit 53: AuditStorePolicy - 2 .................................................................................................... 49 Exhibit 54: Logging Tuning - 1 ....................................................................................................... 51 Exhibit 55: Logging Tuning - 2 ....................................................................................................... 52 Exhibit 56: Logging Tuning - 3 ....................................................................................................... 52 Exhibit 57: Logging Tuning - 4 ....................................................................................................... 53 Exhibit 58: MDS Purging - 1 .......................................................................................................... 70 Exhibit 59: MDS Purging - 2 .......................................................................................................... 71 Exhibit 60: Stuck Thread Timer Interval - 1...................................... Error! Bookmark not defined. Exhibit 61: : Stuck Thread Timer Interval - 2.................................... Error! Bookmark not defined. Exhibit 62: : Stuck Thread Timer Interval - 3.................................... Error! Bookmark not defined. Exhibit 63: Data Display Option for EM Console - 1 ........................ Error! Bookmark not defined. Exhibit 64: : Data Display Option for EM Console - 2 ...................... Error! Bookmark not defined. Exhibit 65: : Data Display Option for EM Console - 3 ...................... Error! Bookmark not defined. Exhibit 66: Un-Target DMS from servers - 1 .................................... Error! Bookmark not defined. Exhibit 67: Un-Target DMS from servers - 2 .................................... Error! Bookmark not defined. Exhibit 68: : Un-Target DMS from servers - 3 .................................. Error! Bookmark not defined. Exhibit 69: Un-Target DMS from servers - 4 .................................... Error! Bookmark not defined. Exhibit 70: Un-Target DMS from servers - 5 .................................... Error! Bookmark not defined. Exhibit 71: BPEL recovery console option - 1................................... Error! Bookmark not defined. Exhibit 72: BPEL recovery console option - 2................................... Error! Bookmark not defined. 11
  • 12. Exhibit 73: vmstat ............................................................................ Error! Bookmark not defined. Exhibit 74: free ................................................................................. Error! Bookmark not defined. Exhibit 75: pmap .............................................................................. Error! Bookmark not defined. Exhibit 76: top .................................................................................. Error! Bookmark not defined. Exhibit 77: sar-B ............................................................................... Error! Bookmark not defined. Exhibit 78: meminfo ......................................................................... Error! Bookmark not defined. Exhibit 79: mpstat ............................................................................ Error! Bookmark not defined. Exhibit 80: mpstat 2 4 ...................................................................... Error! Bookmark not defined. Exhibit 81: df-m ................................................................................ Error! Bookmark not defined. Exhibit 82: WebLogic Homes ........................................................... Error! Bookmark not defined. Exhibit 83: Synchronous – Asynchronous - 1 ................................... Error! Bookmark not defined. Exhibit 84: Synchronous – Asynchronous - 2 ................................... Error! Bookmark not defined. Exhibit 85: Database Monitoring ..................................................... Error! Bookmark not defined. Exhibit 86: JMS Monitoring .............................................................. Error! Bookmark not defined. Exhibit 87: AQ Monitoring ............................................................... Error! Bookmark not defined. Exhibit 88: Setup jConsole or visualVM (installed locally) - 1 .......... Error! Bookmark not defined. Exhibit 89: Setup jConsole or visualVM (installed locally) - 2 .......... Error! Bookmark not defined. Exhibit 90: Setup jConsole or visualVM (installed locally) - 3 .......... Error! Bookmark not defined. Exhibit 91: Setup jConsole or visualVM (installed locally) - 4 .......... Error! Bookmark not defined. Exhibit 92: Heap Dump Files analysis - 1 ......................................... Error! Bookmark not defined. Exhibit 93: Heap Dump Files analysis - 2 ......................................... Error! Bookmark not defined. Exhibit 94: Heap Dump Files analysis - 3 ......................................... Error! Bookmark not defined. Exhibit 95: Heap Dump Files analysis - 4 ......................................... Error! Bookmark not defined. Exhibit 96: Heap Dump Files analysis - 5 ......................................... Error! Bookmark not defined. Exhibit 97: Heap Dump Files analysis - 6 ......................................... Error! Bookmark not defined. 12
  • 13. Snippets Snippet 1: Sample Work Manager - 1 .............................................. Error! Bookmark not defined. Snippet 2: Sample Work Manager - 2 .............................................. Error! Bookmark not defined. Snippet 3: Sample config.xml........................................................... Error! Bookmark not defined. Snippet 4: Sample startWeblogic.sh ................................................ Error! Bookmark not defined. Snippet 5: Using setNull In a Prepared Statement .......................... Error! Bookmark not defined. Snippet 6: Sample thread waiting for DB Call to finish.................... Error! Bookmark not defined. Snippet 7: composite.xml ............................................................................................................. 32 Snippet 8: Drop Histrogram .......................................................................................................... 71 Snippet 9: Set Table Preferences .................................................................................................. 71 Snippet 10: Single Threaded Model - jca file ................................................................................ 73 Snippet 11: Partitioned Threaded Model - jca file........................................................................ 73 Snippet 12: Tuning number of files to be processed at a time .................................................... 77 Snippet 13: JMS Adapter - Receive Thread - composite.xml ........................................................ 83 Snippet 14: AQ Adapter - Dequeue Threads - composite.xml...................................................... 83 Snippet 15: common properties schema - 1................................................................................. 86 Snippet 16: common properties schema - 2................................................................................. 86 Snippet 17: bpel.xml ..................................................................................................................... 87 Snippet 18: composite.xml ........................................................................................................... 87 Snippet 19: SecureFiles ................................................................................................................. 98 Snippet 20: BasicFiles to SecureFiles ............................................................................................ 99 13
  • 14. Tables Table 1: AuditLevel........................................................................................................................ 41 Table 2: BPEL Engine - AuditLevel ................................................................................................. 46 Table 3: AuditStorePolicy .............................................................................................................. 48 Table 4: SOA Schemas ................................................................................................................... 53 Table 5: SOAINFRA Tables ............................................................................................................. 54 Table 6: MDS Schema tables......................................................................................................... 55 Table 7: CUBE_INSTANCE.............................................................................................................. 56 Table 8: CUBE_SCOPE ................................................................................................................... 57 Table 9: COMPOSITE_INSTANCE ................................................................................................... 57 Table 10: COMPOSITE_INSTANCE_FAULT .................................................................................... 59 Table 11: AUDIT_TRAIL ................................................................................................................. 59 Table 12: AUDIT_DETAILS ............................................................................................................. 60 Table 13: DLV_MESSAGE .............................................................................................................. 60 Table 14: DLV_SUBSCRIPTION ...................................................................................................... 61 Table 15: DOCUMENT_CI_REF ...................................................................................................... 62 Table 16: DOCUMENT_DLV_MSG_REF ......................................................................................... 62 Table 17: WORK_ITEM .................................................................................................................. 62 Table 18: XML_DOCUMENT .......................................................................................................... 65 Table 19: XML_DOCUMENT_REF .................................................................................................. 65 Table 20: HEADERS_PROPERTIES .................................................................................................. 65 Table 21: CLUSTER_MASTER ......................................................................................................... 65 Table 22: CLUSTER_NODE ............................................................................................................. 66 Table 23: Partial Partitioning ........................................................................................................ 67 Table 24: Complete Partitioning ................................................................................................... 68 Table 25: MDS_NAMESAPCES....................................................................................................... 69 Table 26: MDS_PARTITIONS ......................................................................................................... 69 Table 27: MDS_PATHS .................................................................................................................. 69 Table 28: File & FTP Adapter - Inbound Throttling ....................................................................... 73 Table 29: : File & FTP Adapter - Outbound Throttling .................................................................. 74 Table 30: : File & FTP Adapter - Outbound Best Practices............................................................ 75 Table 31: completionPersistPolicy property ................................................................................. 87 Table 32: validateSchema value ................................................................................................... 88 Table 33: Idempotency value........................................................................................................ 88 Table 34: nonBlockingInvoke value ............................................................................................. 89 Table 35: Database initialization parameters ............................................................................... 89 Table 36: Contention tables .......................................................................................................... 95 Table 37: Tables under potential of index contention ................................................................. 96 14
  • 15. 15
  • 16. BPEL Engine Tuning In very simplistic terms, BPEL Engine is a J2EE application. This application also acts as a container for hosting BPEL processes/composites. This application also has UI component to facilitate human interaction. While talking about tuning of BPEL we will keep this picture in view. Our focus will be tuning of BPEL engine though we will consider few points which also cover UI part as well. From tuning perspective BPEL engine can be broken into: 1. 2. 3. 4. EJBs Threading Model Database part Fusion Middleware Control ( UI part) BPEL Process Manager provides several property settings that can be configured from Enterprise Manager Fusion Middleware Control to optimize performance for response times, throughput, and concurrency. The BPEL PM can be tuned at either at the infrastructure, service engine, composite or the process level. To tune a BPEL engine, it is absolutely essential to know type of processes/composites deployed, cluster topology, WLS topology, load pattern, and JVM configuration. Processes can be categorized by the nature of their interfaces, for example, asynchronous, push based, or synchronous. They can also be durable (long running) or transient (short lived). Again, in any of these processes, there may be activities that are idempotent (retry-able, such as the Assign and Invoke activities) or invocations that are non-blocking (happening in parallel). A process can also have a breakpoint wherein its state is saved in the dehydration store or the state is not stored at all. All these factors have to be taken into consideration when tuning the BPEL PM. 1 Real Time Viewing of Performance Metrics To monitor the performance metrics at real time, one has following options. 1.1 Fusion Midddleware Control Fusion Midddleware Control (FMC) provides facility to view various matrices related to resources consumption and performance. 1. Login to FMC (http://<<serverName>>:<port>>/em) 16
  • 17. Exhibit 1: FMC Login 2. Summary page of Farm will appear. Exhibit 2: FMC Farm Summary This page shows CPU usage for Admin server and managed server under which BPEL Engine is running. 3. Expand “SOA” from left hand side panel and invoke contextual menu by right clicking on one of the managed server. Select Monitoring Performance Summary 17
  • 18. Exhibit 3: FMC Performance Summary - 1 FMC will display partitions for the managed server in left panel and few of the statistics in right panel. 18
  • 19. Exhibit 4: FMC Performance Summary - 2 4. Click on “Show Metric Palette” button. Metric Palette appears at right side of screen. Exhibit 5: FMC Performance Summary - 3 From BPEL Engine and deployed BPEL Processes/composite perspective, experiment with various matrices. Once matrices of interest are identified from infrastructure set up and composites deployed perspective, observe them and note down the important observations. But FMC shows the matrices in real time only which restricts its utility from historical analysis perspective. Some time it is difficult to operate FMC during heavy load. 1.2 Dynamic Memory Service The Dynamic Monitoring Service (DMS) enables Fusion Middleware components to provide administration tools, such as Oracle Enterprise Manager, with data regarding the component's performance, state and on-going behavior. Fusion Middleware Components push data to DMS and in turn DMS publishes that data through a range of different components. Specifically, DMS is used by Oracle WebCache, Oracle HTTP Server (OHS), Oracle Application Development Framework (ADF), WebLogic Diagnostic Framework (WLDF), and JDBC. DMS measures and reports metrics trace events and system performance and provides a context correlation service for these components. 19
  • 20. One can also monitor (but in real time) various matrices using DMS (Dynamic Memory Service) servlet (http://<<host>>:<<port>>/dms/Spy). soainfra_component is good place to start in DMS Servlet to play with. Exhibit 6: Dynamic Memory Service For historical data collection perspective one has two options: 1. Use Enterprise Manager Grid Control 2. Use custom scripts and sql queries This book will be going by second approach because it cannot be assumed that everyone has Enterprise Manger Grid in infrastructure mix. 2 BPEL Engine Threading Model BPEL Engine’s threading model is based on common sense. Before tuning it, one needs to understand the same. BPEL Engine has three thread pools. Each thread pool holds threads of specific type to manage various types of work in BPEL engine. First pool consists of system threads which does all plumbing work required to BPEL Engine keep on running. Essentially these threads do general clean up tasks like releasing stateful beans to pool. These threads are processed by BPEL Engine on high priority. Couples of these types of threads are sufficient even for heavily loaded BPEL Engine. These threads are called Dispatcher System Threads and their number is managed by dspSystemThreads property in FMC. The default value of dspSystemThreads is 2. Its value cannot be set 0 or negative. Any value less than 1 is set to default. The second pool holds Dispatcher Invoke Threads. These threads are responsible for taking any incoming message and initiating a new instance. Numbers of Dispatcher Invoke Threads in the pool are controlled by dspInvokeThreads property which can be accessed via FMC. Dispatcher Invoke Threads are also responsible for processing of synchronous processes. 20
  • 21. If BPEL Engine is hosting lot of synchronous processes, increasing value of dspInvokeThreads will improve the performance but higher value of dspInvokeThreads also lead to greater CPU utilization due to context switching. The default value of dspInvokeThreads is 20. Its value cannot be set 0 or negative. Any value less than 1 is set to default. The third pool holds Dispatcher Engine Threads. These threads are responsible for processing asynchronous messages. Numbers of Dispatcher Engine Threads in the pool are controlled by dspEngineThreads property which can be accesses via FMC. The default value of dspEngineThreads is 30. Its value cannot be set 0 or negative. Any value less than 1 is set to default. The pictorial representation of threading model of BPEL Engine is in following exhibit: Exhibit 7: BPEL Engine Threading Model 21
  • 22. 2.1 Dispatcher Maximum Request Depth BPEL Engine threading model also consists of a property which controls the number of inmemory activities in processes should be processed within a transaction. This property is labeled as dspMaxRequestDepth. Once the process activity chain has reached this depth, instance is dehyderated and next activity is performed in separate transaction. The default value of dspMaxRequestDepth is 600. Its value cannot be set 0 or negative. Any value less than 1 is set to default. If dspMaxRequestDepth value is set very low, number of data base calls increases which affects performance and also instance processing time may exceed application server transaction time out limit. If value is set two high, server may face out of memory error. Exhibit 8: Dispatcher Maximum Request Depth - 1 22
  • 23. Exhibit 9: Dispatcher Maximum Request Depth - 2 2.2 InvokeMessages In Cache The MaximumNumberOfInvokeMessagesInCache property specifies the number of invoke messages that can be kept in the in-memory cache. Once the engine hits this limit, the message is pushed to dispatcher in-memory cache. The saved messages can be recovered using a recovery job. Use value -1 to disable. The default value is 100000. High value of MaximumNumberOfInvokeMessagesInCache increases performance but may result is out-of-memory issues. Exhibit 10: InvokeMessages In Cache 23
  • 24. 3 Transaction Timeout 3.1 syncMaxWaitTime syncMaxWaitTime specifies the maximum time the process receiver waits for getting the response. If the BPEL process service component does not receive a reply within the specified time, then the activity fails. The syncMaxWaitTime property applies to durable synchronous (having breakpoint activities which forces dehyderation) processes called in a synchronous manner. A breakpoint activity is an activity in which BPEL Engine must wait for a timer to expire or for any incoming messages. The BPEL process instance is dehydrated by the BPEL Server when it encounters a breakpoint activity and the state of the process is saved in the database. The following activities are considered to be breakpoint activities: a. b. c. d. e. Receive (except if it is the first activity of the process) Wait Pick (onAlarm, onMessage) Checkpoint Reply Durable processes are those processes which have one or more breakpoint activities. Durable processes are normally long-lived. They must wait for some event to occur or some time to get expired. This parameter is only for the Synchronous process with breakpoint activities. This configuration is not for the asynchronous process since in case of async BPEL no receiver thread is waiting to timeout. Do not co-relate this parameter for the synchronous transaction to the external system from Asynchronous BPEL/composite process. Users expect a Sync invocation to external system Webservice should timeout if it’s taking more time than configure for syncMaxWaitTime period. This parameter is not applicable for this scenario, try to implement httpReadTimeout and httpConnTimeout property within composite itself If one observes following exception, consider configuring syncMaxWaitTime property: The transaction was rolled back or Transaction Rolledback.: weblogic.transaction.internal.TimedOutException: Transaction timed out 1. Login into FMC 24
  • 25. Exhibit 11: syncMaxWaitTime - 1 2. Navigate to soa-infra SOA Administration BPEL Properties Exhibit 12: syncMaxWaitTime - 2 25
  • 26. 3. Click on "More BPEL Configuration Properties..." hyperlink Exhibit 13: syncMaxWaitTime - 3 4. Locate syncMaxWaitTime and change it. Exhibit 14: syncMaxWaitTime – 4 26
  • 27. 5. Click on Apply button. 3.2 BPEL EJBs The timeout properties for the EJBs control the particular timeout setting for the SOA application, overriding the global setting specified by the JTA timeout (See step 3). Note: Prior to changing BPEL EJBs transaction time out values, ensure to shutdown SOA managed server. Otherwise errors will popup. 1. Log into WLS Administration Console. Exhibit 15: BPEL EJBs - 1 2. Click “Deployments” 27
  • 28. Exhibit 16: BPEL EJBs - 2 3. Scroll down and navigate to soa-infra EJBs. 4. Click on individual an EJB 5. Navigate “Configuration” Tab 28
  • 29. Exhibit 17: BPEL EJBs - 3 6. Using Lock & Edit, update “Transaction Timeout” 7. Click on “Save” and “Release Configuration”. 8. Repeat above steps for following EJBs: BPELActivityManagerBean BPELDeliveryBean BPELDispatcherBean BPELEngineBean BPELFinderBean BPELInstanceManagerBean BPELProcessManagerBean BPELSensorValuesBean BPELServerManagerBean 9. Start SOA Managed Server 29
  • 30. 3.3 Global transaction timeout at Weblogic Domain Level This property specifies the maximum amount of time, in seconds; an active transaction is allowed to be in the first phase of a two-phase commit transaction. If the specified amount of time expires, the transaction is automatically rolled back. In case of single phase transactions, if the transaction is still in the "active" state after this time, it is automatically rolled back. Minimum value: 1 Maximum value: 2147483647 1. Log into WLS Administration Console. Exhibit 18: Global transaction timeout at WLS Domain Level - 1 2. Click on “JTA” 3. Navigate to Configuration JTA tab 30
  • 31. Exhibit 19: Global transaction timeout at WLS Domain Level - 2 4. Using Lock & Edit, update “Transaction Timeout” 5. Change the value of Timeout Seconds. 6. Click on “Save” and “Release Configuration”. 7. Restart WLS. 3.4 Webservice Read and connection timeout When an http request has been made to external system using web service httpReadTimeout, httpConnTimeout, and optimization properties can be used to timeout that transaction. These values are identified in milliseconds and this configuration only applicable for http protocol based web service invocation. One can define httpReadTimeout, httpConnTimeout, and optimization in composite.xml for the service for which timeout has to set. <reference name="Service1" ui:wsdlLocation="http://localhost:90101/soainfra/services/default/Child_1.0/Child.wsdl"> <interface.wsdl interface="http://xmlns.oracle.com/test/Child/Child#wsdl.interface(Child)"/> <binding.ws port="http://xmlns.oracle.com/test/Child/Child#wsdl.endpoint(child_client_ep/ Child_pt)" 31
  • 32. location="http://localhost:9010/soainfra/services/default/Child_1.0/child_client_ep?WSDL"> <property name="oracle.webservices.local.optimization">false</property> <property name="oracle.webservices.httpReadTimeout" type="xs:string" many="false">10000</property> <property name="oracle.webservices.httpConnTimeout" type="xs:string" many="false">5000</property> </binding.ws> </reference> Snippet 1: composite.xml oracle.webservices.local.optimization parameter value could be true/false, make it false if service which user is going to invoke reside in same WLS Instance to avoid execution of SOAP stack In the BPEL process one can add a Catch branch for a RemoteFault if wants to catch this error. Note: When using this parameter it will return a "bpelx:timeout" Fault, and not a RemoteFault. 3.5 Relationship among Timeout parameters If the invocation pattern is like this: Request - Consumer invokes SOA Load balancer SOA Managed Server Provider System Response - Consumer invokes  OA Load balancer  SOA Managed Server  Provider System Then as a general rule, keep the following relation between the timeout parameters: Consumer system/API Timeout > SOA Load Balancer Timeout (If applicable) > Global Transaction Timeout JTA > BPEL EJB's transaction timeout > syncMaxWaitTime OR composite Level Timeout > Provider System/API timeout Note: This recommendation is only applicable to sync Processes. Additionally the default Timeout setting that comes with SOA 11g installation does not comply with this rule. One might need to adjust the setting according to particular business and technical requirements. 3.6 WLS Timeout parameters There are few more parameters related to timeout which may also affect performance. Let us consider first at general protocol level for a managed server. 1. Login into WLS console 2. Navigate to <<Domain Name>> Environment Servers 32
  • 33. Exhibit 20: WLS Timeout parameters - 1 3. Click on a particular managed server 33
  • 34. Exhibit 21: WLS Timeout parameters - 2 4. Navigate to Protocol General tab 34
  • 35. Exhibit 22: WLS Timeout parameters - 3 At this page one can tune few of the timeout parameters. 3.6.1 Complete Message Timeout CompleteMessageTimeout defines the maximum number of seconds that this server waits for a complete message to be received. Each network channel can override this value if configured. CompleteMessageTimeout affects the HTTP Response, such that if WLS discovers sockets inactive for longer than the CompleteMessageTimeout, the server will close these sockets. Though original intent of this attribute is guard against a denial of service attack but can be used to timeout long messages to improve throughput of WLS. Minimum value: 0 Maximum value: 480 3.6.2 Idle Connection Timeout: The maximum number of seconds that a connection is allowed to be idle before it is closed by the server. IdleConnectionTimeout defines the maximum number of seconds that a connection is allowed to be idle before it is closed by the server. The T3 and T3S protocols ignore this attribute. Each network channel can override this value if configured 35
  • 36. This timeout helps guard against server deadlock through too many open connections. Minimum value: 0 Typical value: 65 3.6.3 Tunneling Client Timeout The amount of time (in seconds) after which a missing tunneled client is considered dead. Each network channel can override this value if configured Minimum value: 1 Let us move to HTTP tab: 1. Login into WLS console 2. Navigate to <<Domain Name>> Environment Servers Exhibit 23: Tunneling Client Timeout - 1 36
  • 37. 3. Click on a particular managed server Exhibit 24: Tunneling Client Timeout - 2 4. Navigate to Protocol HTTP tab 37
  • 38. Exhibit 25: Tunneling Client Timeout - 3 Few more parameters to tune here. 3.6.4 Post Timeout Timeout (in seconds) for reading HTTP POST data in a servlet request. If the POST data is chunked, the amount of time the server waits between the end of receiving the last chunk of data and the end of receiving the next chunk of data in an HTTP POST before it times out. Though original intent of this attribute is guard against a denial of service attack but can be used to timeout long messages to improve throughput of WLS. Minimum value: 0 Maximum value: 120 Typical value: 30 3.6.5 Duration The amount of time this server waits before closing an inactive HTTP connection. Number of seconds to maintain HTTP keep-alive before timing out the request. 38
  • 39. Minimum value: 5 Maximum value: 3600 Typical value: 30 3.6.6 Tunneling Client Timeout The amount of time (in seconds) after which a missing tunneled client is considered dead. Each network channel can override this value if configured. Minimum value: 1 4 BPEL PM Audit and Logging In BPEL Engine, Audit and Logging are clearly demarcated. Auditing answers the question: • Who did what and why? Logging is focuses on: • What's happening and how? Auditing is about recording domain-level events: a transaction is created; messages under processing, etc. Audit trail is recorded in database. Audit trail is important from business perspective. Logging means the recording of implementation level events that happen as the BPEL Engine is running: such as general health of BPEL Engine, any exception/error thrown by BPEL Engine or process/composite, etc. Logging is recorded in file system. Generally technical team is more interested in logging. 4.1 Audit Tuning Audit information is used for viewing the state of the process from FMC. 4.1.1 SOA Infrastructure level The properties set at SOA Infrastructure level impacts all deployed composites, except those composites for which explicitly different audit or payload validation values are set at the composite application level. a. Log in to FMC b. Navigate to <<farmName>> SOA <<managedServer>> SOA Administration Common Properties 39
  • 40. Exhibit 26: SOA Infrastructure level audit tuning - 1 40
  • 41. Exhibit 27: SOA Infrastructure level audit tuning - 2 4.1.1.1 Audit Level The auditLevel property controls the audit trail logging level. This configuration property is applicable to both durable and transient processes. AuditLevel property has following possible values: Table 1: AuditLevel Value Production Development Off Description Composite instance tracking is collected, but Mediator engine will not collect payload details and BPEL engine will not collect payload details for assign activities (payload details for other BPEL activities are collected). This level is optimal for most normal production operations. This is default value. Allows both the composite instance tracking and payload detail tracking. However it may impact the performance. This level is useful mostly for testing and debugging purposes. No logging is performed. Composite instance tracking and payload details are not collected. 41
  • 42. In production environment, AuditLevel should be set to Production or Off. 4.1.1.2 Capture Composite Instance State This attributes enables tracking for "running" instances. Enabling this feature may impact the performance negatively. 4.1.1.3 Payload Validation Selecting this field validates incoming and outgoing XML documents using Schema validation. Nonschema-compliant payload data is intercepted and displayed as a fault. This property is applicable to both durable and transient processes. Enabling XML payload validation can impact performance negatively. 4.1.1.4 AuditConfig This attribute is collection of few properties but only following are important from performance perspective. a. instanceTrackingAuditTrailThreshold: This property sets the maximum size (in kilobytes) of an audit trail details string which will be stored in audit_trail table. If audit trail string is larger than instanceTrackingAuditTrailThreshold then it stored in audit_details table. Data from audit_details is not immediately loaded when the audit trail is initially retrieved in FMC but a hyper link is displayed which on click shows the string stored. instanceTrackingAuditTrailThreshold value affect performance of BPEL Engine while processing messages but also UI component (FMC) as well. b. When to audit: By default, audit data is logged to the database synchronously. By switching the audit policy to deferred, all audit operations are invoked asynchronously Capture Composite Instance State must be disabled. Set following values: policies/Element_0/name: Set this value to Immediate policies/Element_0/isActive: policies/Element_1/name: Set this value to false Set this value to Deferred policies/Element_1/isActive: set this value to True Set this value to maxThreads policies/Element_1/properties/Element_0/value: Set this value to <<number>> policies/Element_1/properties/Element_1/name: Set this value to flushDelay policies/Element_1/properties/Element_0/name: 42
  • 43. Set this value to <<seconds>> policies/Element_1/properties/Element_2/name: Set this value to batchSize policies/Element_1/properties/Element_2/value: Set this value to <<number>> policies/Element_1/properties/Element_1/value: 1. Click on More SOA Infra Advanced Configuration Properties... Exhibit 28: AuditConfig - 1 2. Click on AutoConfig 43
  • 44. Exhibit 29: AuditConfig - 2 3. Update attributes under AutoConfig Exhibit 30: AuditConfig - 3 44
  • 45. Exhibit 31: AuditConfig - 4 Exhibit 32: AuditConfig - 5 4. Click on Apply button. 45
  • 46. 4.1.2 BPEL Engine Level 4.1.2.1 AuditLevel The auditLevel property controls the audit trail logging level. This configuration property is applicable to both durable and transient processes. AuditLevel property has following possible values: Table 2: BPEL Engine - AuditLevel Value Inherit Off Minimal Error Production Development Description Inherits the audit level from infrastructure level. No audit events (activity execution information) are persisted and no logging is performed All events are logged; however, no audit details (variable content) are logged. Logs only serious problems that require immediate attention from the administrator and are not caused by a bug in the product. All events are logged. The audit details for assign activities are not logged; the details for all other activities are logged. All events are logged; all audit details for all activities are logged. Performance improvement is observed if auditLevel is set to off or Minimal or Error. 4.1.2.2 AuditDetailThreshold The auditdetailthreshold property sets the maximum size (in kilobytes) of an audit trail details string which will be stored in audit_trail table. If audit trail string is larger than auditdetailthreshold then it stored in audit_details table. Data from audit_details is not immediately loaded when the audit trail is initially retrieved in FMC but a hyper link is displayed which on click shows the string stored. . The default value is 50000 (50 kilobytes). auditdetailthreshold value affect performance of BPEL Engine while processing messages but also UI component (FMC) as well. 4.1.2.3 Payload Validation validateXML setting to true or selecting Payload Validation checkbox validates incoming and outgoing XML documents using Schema validation. Nonschema-compliant payload data is intercepted and displayed as a fault. This property is applicable to both durable and transient processes. Enabling XML payload validation can impact performance negatively. 46
  • 47. Exhibit 33: Payload Validation - 1 47
  • 48. Exhibit 34: Payload Validation - 2 4.1.3 AuditStorePolicy This property specifies the strategy to persist the BPEL audit data. Table 3: AuditStorePolicy Value Description Audit Trail and dehydration are persisted to DB in one transaction. syncMultipleWrite Audit Trail and dehydration are persisted in the same thread but separate transactions. async Audit Trail and dehydration are persisted by separate threads and separate transactions. syncSingleWrite By default, audit messages are stored as part of the main BPEL transaction. In scenarios where a large number of audit logs are accumulated as part of a single transaction like looping, may lead to an out-of-memory and/or time out issue for BPEL main transaction. One may consider using syncMultipleWrite or async to store the audit message separately from the main transaction. When using syncMultipleWrite or async, for auditStorePolicy one needs tune AuditFlushByteThreshold and AuditFlushEventThreshold properties as well. 48
  • 49. Exhibit 35: AuditStorePolicy - 1 Exhibit 36: AuditStorePolicy - 2 4.1.4 AuditFlushByteThreshold This property controls how often the engine should flush the audit events, after adding an event to the current batch, the engine checks to see if the current batch byte size is greater than this value or not. AuditFlushByteThreshold need to be tuned if auditStorePolicy syncMultipleWrite or async. is set to 4.1.5 AuditFlushEventThreshold This property controls how often the engine should flush the audit events, when it reaches to mentioned limit of the number of events, the engine would trigger a call to persist audit data. 49
  • 50. AuditFlushEventThreshold need to be tuned if auditStorePolicy syncMultipleWrite or async. is set to 4.1.6 AsyncAuditPersisterThreads When auditStorePolicy is set to async, the audit data will be put in an in-memory queue and a separate pool of that performs the persistence of the audit data. This property sets size of this pool. AsyncAuditPersisterThreads value needs to be tuned based on how much audit log being generated and CPU utilization. 4.1.7 AsyncAuditQueueSize When auditStorePolicy is set to async, the audit data will be put in an in-memory queue. AsyncAuditQueueSize sets upper bound of the queue, controlling maximum number of entries in the queue. AsyncAuditQueueSize value needs to be tuned based on how much audit log being generated and free memory. 4.2 Logging Tuning There are two types of loggers: 1. Persistence Logger 2. Runtime Logger Persistent loggers become active when the component is started. The log levels for these loggers are persisted across component restarts. Runtime loggers are automatically created during runtime and become active when a particular feature area is exercised. BPEL Engine records logs in flat files on the file system. The logs typically reside under $MW_HOME/<<project>> /domains/<<domainName>>/servers/<<ServerName>>/logs. Set the log levels to ERROR: 1 (SEVERE) across the board. This will reduce the amount of information logged and will give a slight improvement on performance. These log levels can be adjusted and enabled to higher levels of auditing at runtime, if additional debugging information is ever required. To set the log levels: 1. Log in to FMC. 2. Navigate till 50
  • 51. <<farmName>> WebLogic Domain <<managedServerName>> <<domainName>> <<clusterName>> Exhibit 37: Logging Tuning - 1 3. Right click on one of the managed server and navigate till Log Configuration <<managedServerName>> Logs Log Configuration 51
  • 52. Exhibit 38: Logging Tuning - 2 Exhibit 39: Logging Tuning - 3 4. In right hand side panel, select the dropdown named View with value With Persistent Log Level State. 52
  • 53. Exhibit 40: Logging Tuning - 4 5. Expand Root Logger Node and apply log level ERROR: 1 (SEVERE) 6. Click on Apply button. 5 BPEL Engine Database Schema The SOA Suite database requires sufficient memory to be available in order to support the enterprise class installation. To approximate the memory requirements on the machine where the database is installed, the following demands should be taken into consideration: • • • • • Oracle Database overhead. Size of System Global Area Number of concurrent users Any non-database software that has to run on the machine. Growth in usage over planned lifetime of SOA Suite BPEL Engine and deployed composites/processes are transaction intensive applications, tuning of underlying database results in major performance boost. 5.1 Two Schemas SOA Suite uses two database schemas. Table 4: SOA Schemas Component BPEL Process Manager Schema SOAINFRA Description Contains the design and run-time repository of BPEL PM and BPM. The design repository has modeling metadata and profile data for composites. This data describe the behavior of composites and sequence of steps 53
  • 54. required to execute the composite. MDS Oracle Metadata Services SOA Infrastructure MDS SOAINFRA Once the composite is deployed, the run-time repository contains the metadata to execute the composite. Contains process definitions and configuration reference data. Contains metadata for composites that use MDS. Contains metadata related to B2B, BPEL PM, Workflow, Sensor, Mediator, and CEP. Tables in SOAINFRA Schema do not enforce referential integrity; Components of SOA Suite manages referential integrity via code. Within SOAINFRA schema following are important tables used by SOAP Infrastructure and BPEL PM: Table 5: SOAINFRA Tables Fusion Component Table COMPOSITE_INSTANCE COMPOSITE_INSTANCE_FAULT Description Stores information related to composites. Stores stack trace for system level exceptions for composites. SOA Infrastructure column error_category represents business and technical faults. REFERENCE_INSTANCE COMPOSITE_SENSOR_VALUE COMPONENT_INSTANCE REJECTED_MESSAGE REJECTED_MSG_NATIVE_PAYLOA D INSTANCE_PAYLOAD COMPOSITE_INSTANCE_ASSOC CLUSTER_NODE BPEL Process Manager CLUSTER_MASTER CUBE_INSTANCE Stores cluster related information on which BPEL PM is running. Stores cluster’s master node info. Stores the processes instance metadata for every instance that is being initiated, under execution and executed successfully/faulted. CI_INDEXES CUBE_SCOPE Stores the scope data of an instance. All the variables declared in the BPEL flow and some internal objects to help route logic throughout the flow are stored in this 54
  • 55. table. DOCUMENT_CI_REF AUDIT_TRAIL AUDIT_DETAILS DLV_SUBSCRIPTION WORK_ITEM Stores cube instance references to data stored in the XML_DOCUMENT table. Stores the audit trail for instances which can be viewed in FMC. As an instance is executed, each activity writes events to the audit trail as XML. Stores audit details that can be logged through the API. Activities such as an assign activity log the variables as audit details by default. If instanceTrackingAuditTrailThreshold is set audit trail is stored here. Stores delivery subscriptions for an instance. Whenever an instance expects a message from a partner (for example, receive or onMessage activity) a subscription is written out for that specific receive activity. Stores each activity’s metadata in an instance. This table includes the metadata for the activity (current state, label, and expiration date (used by wait activities)). AUDIT_COUNTER WI_FAULT DLV_MESSAGE HEADERS_PROPERTIES DOCUMENT_DLV_MSG_REF XML_DOCUMENT Stores incoming (invocation) and callback messages metadata upon receipt. It also stores pending messages. Stores headers and properties information. Stores references to DLV_MESSAGE documents stored in the XML_DOCUMENT table. Stores all large objects in the system (e.g. DLV_MESSAGE documents). This table stores the data as binary large objects (BLOBs). Separating the document storage from the metadata enables the metadata to change frequently without being impacted by the size of the documents. Table 6: MDS Schema tables Fusion Component Table MDS MDS_PARTITIONS MDS_PATHS Description Stores details of SOA components installed using this repository Stores details of components/composites deployed on 55
  • 56. MDS_NAMESAPCES this installation. Stores name spaces referred by this deployment Table 7: CUBE_INSTANCE CUBE_INSTANCE Column CIKEY CREATION_DATE MODIFY_DATE STATE Description Primary Key. Acts as Foreign Key (logically but not physically) in lot of other tables Date Time stamp indicating initiated date time of an instance. Date Time stamp to indicate latest change in an instance Current state of an instance. 0: STATE_INITIATED: An instance that has just been created. 1: STATE_OPEN_RUNNING: An instance that has been created and has active activities executing. The instance is not in an exception or error condition. 2: STATE_OPEN_SUSPENDED: An instance that is unavailable. Performers of any of the activities that belong to this instance cannot take any action until the instance has returned to the running state. 3: STATE_OPEN_FAULTED: An instance that has an activity that has thrown an exception. When an activity throws an exception, the instance is flagged as being in an exception state until the exception is bubbled up, caught and handled. 4: STATE_CLOSED_PENDING_CANCEL: An instance that has started its cancellation procedure. Since cancelling an instance may involve a great deal of business logic, the amount of time the entire cancellation process may take from seconds to days. During this time, the instance is said to be pending cancellation; an instance may not be acted upon during this time. 5: STATE_CLOSED_COMPLETED: An instance that has been completed. All activities belonging to this instance have also been completed. 6: STATE_CLOSED_FAULTED: An instance that has an activity that has thrown an exception while the instance is being cancelled. This state is equivalent to STATE_OPEN_FAULTED except that when the exception is resolved, the state transitions back to CLOSED_PENDING_CANCEL rather than STATE_OPEN_RUNNING 7: STATE_CLOSED_CANCELLED: An instance that has been cancelled. All activities belonging to this instance have also been cancelled. 56
  • 57. TITLE STATUS CONVERSATION_ID PARENT_ID ECID 8: STATE_CLOSED_ABORTED: An instance that has been aborted due to administrative control. All activities belonging to this instance are also moved to the aborted state. 9: STATE_CLOSED_STALE: An instance who's process has been changed since the process was last accessed. No actions may be performed on the instance. All activities that belong to this instance are also moved to the stale state 10: STATE_CLOSED_ROLLED_BACK Current instance title (as specified in composite, no engine impact) Current status (as specified in composite) Identifier associated with instance, e.g. passed in via WSAddressing or user specified custom key CMPST_ID or CIKEY of the parent instance that created this instance, instance at the top of the tree will null value Foreign key (logical only not physical)from COMPOSITE_INSTANCE table COMPOSITE_INSTANCE.ECID CMPST_ID COMPONENTTYPE COMPOSITE_NAME DOMAIN_NAME COMPONENT_NAME COMPOSITE_REVISION CREATE_CLUSTER_NODE_ID Name of composite Application name Name of component Version number of composite Node ID on which this composite if executed. CLUSTER_NODE.IP_ADDRESS CPST_INST_CREATED_TIME Table 8: CUBE_SCOPE CUBE_SCOPE Column CIKEY Description It is primary key. This column ensures one to one foreign key relationship from CUBE_INSTANCE.CIKEY BINARY_FORMAT MODIFY_DATE SCOPE_BIN Date scope last modified Scope bytes Table 9: COMPOSITE_INSTANCE COMPOSITE_INSTANCE Column ECID Description Primary Key ID PARENT_ID 57
  • 58. CONVERSATION_ID COMPOSITE_DN SOURCE_NAME SOURCE_TYPE SOURCE_ACTION_TYPE SOURCE_ACTION_NAME BATCH_ID BATCH_INDEX BUSINESS_STATUS TITLE TAGS STATE 0: Running 1: Completed 2: Running with faults 3: Completed with faults 4: Running with recovery required 5: Completed with recovery required 6: Running with faults and recovery required 7: Completed with faults and recovery required 8: Running with suspended 9: Completed with suspended 10: Running with faults and suspended 11: Completed with faults and suspended 12: Running with recovery required and suspended 13: Completed with recovery required and suspended 14: Running with faults, recovery required, and suspended 15: Completed with faults, recovery required, and suspended 16: Running with terminated 17: Completed with terminated 18: Running with faults and terminated 19: Completed with faults and terminated 20: Running with recovery required and terminated 21: Completed with recovery required and terminated 22: Running with faults, recovery required, and terminated 23: Completed with faults, recovery required, and terminated 24: Running with suspended and terminated 25: Completed with suspended and terminated 26: Running with faulted, suspended, and terminated 27: Completed with faulted, suspended, and terminated 28: Running with recovery required, suspended, and terminated 29: Completed with recovery required, suspended, and terminated 30: Running with faulted, recovery required, suspended, and terminated 58
  • 59. 31: Completed with faulted, recovery required, suspended, and terminated 32: Unknown 34: Open and Faulted 36: Running with recovery required and unknown state 64: Stale LIVE_INSTANCES STATE_COUNT HAS_ASSOC VERSION Version of composite Table 10: COMPOSITE_INSTANCE_FAULT COMPOSITE_INSTANCE_FAULT Column ECID ID Description COMPOSITE_INSTANCE.ECID PARENT_ID COMPOSITE_INSTANCE_ID COMPOSITE_DN UNIQUE_ID BATCH_ID CREATED_TIME client SERVICE_NAME BINDING_TYPE binding.ws PROTOCOL_MESSAGE_ID PROTOCOL_CORRELATION_ID ERROR_CATEGORY s d ERROR_CODE ERROR_MESSAGE STACK_TRACE RETRY_COUNT MESSAGE_ORIGIN_REFERENCE ADDITIONAL_PROPERTIES Table 11: AUDIT_TRAIL AUDIT_TRAIL Column CIKEY COUNT_ID BLOCK Description CUBE_INSTANCE.CIKEY Many audit trail entries may be made for each instance; this column is incremented for each entry per instance. When the instance is dehydrated, the batched audit trail 59
  • 60. BLOCK_CSIZE BLOCK_USIZE LOG entries up to that point are written out. This block ties together all rows written out at one time. Compressed size of block in bytes Uncompressed size of block in bytes Block bytes NUM_OF_EVENTS Table 12: AUDIT_DETAILS AUDIT_DETAILS Column CIKEY DETAIL_ID Description CUBE_INSTANCE.CIKEY BLOCK_CSIZE BLOCK_USIZE Part of composite key, means of identifying particular detail from the audit trail Compressed size of detail in bytes Uncompressed size of detail in bytes DOC_REF BIN Detail bytes Table 13: DLV_MESSAGE DLV_MESSAGE Column CONV_ID CONV_TYPE MESSAGE_GUID Description Conversation id (correlation id) for the message. This value is used to correlate the message to the subscription. internal use Unique identifier for the message...each message received by the engine is tagged with a message guid. PARTNER_LINK OPERATION_NAME Operation name for callback port. EVENT_NAME RECEIVE_DATE STATE date message was received by engine Current state of message 0: STATE_UNRESOLVED: State value for a message/subscriber inserted into system but has not been correlated with its corresponding subscriber/message. 1: STATE_RESOLVED: State value for a message/subscriber has been correlated with its corresponding subscriber/message but has not been processed by the BPEL domain (callback). 2: STATE_HANDLED: State value for a message/subscriber has been processed by the BPEL domain (callback). 3: STATE_CANCELLED: State value for a message/subscriber has been cancelled, will not be processed by the BPEL process. 60
  • 61. RES_SUBSCRIBER 4: STATE_MAX_RECOVERED: Identifier for matching subscription once found. EXT_STRING1 EXT_STRING2 EXT_INT1 DLV_TYPE 1: Invoke Message: New Message 2: DLV Message: Callback Message MASTER_CONV_ID PRIORITY COMPOSITE_NAME DOMAIN_NAME COMPONENT_NAME COMPOSITE_LABEL COMPOSITE_REVISION COMPONENT_TYPE CIKEY RECOVER_COUNT HEADER_PROPERTIES_BIN_FORMAT ECID CLUSTER_NODE_ID CLUSTER_NODE_KEY CACHE_VERSION PROPERTIES HEADERS_REF_ID Table 14: DLV_SUBSCRIPTION DLV_SUBSCRIPTION Column CONV_ID CONV_TYPE Description Conversation id for subscription, used to help correlate received delivery messages. internal use CIKEY PARTNER_LINK CUBE_INSTANCE.CIKEY PROCESS_GUID guid for process this subscription belongs to operation name for subscription (receive, onMessage operation name) Null The work item composite key that this subscription is positioned at (key for receive, onMessage work item). internal use date subscription was created Current state of subscription 0: STATE_UNRESOLVED: State value for a message/subscriber inserted into system but has not been 61 OPERATION_NAME EVENT_NAME SUBSCRIBER_ID SERVICE_NAME SUBSCRIPTION_DATE STATE
  • 62. PROPERTIES correlated with its corresponding subscriber/message. 1: STATE_RESOLVED: State value for a message/subscriber has been correlated with its corresponding subscriber/message but has not been processed by the BPEL domain (callback). 2: STATE_HANDLED: State value for a message/subscriber has been processed by the BPEL domain (callback). 3: STATE_CANCELLED: State value for a message/subscriber has been cancelled, will not be processed by the BPEL domain. 4: STATE_MAX_RECOVERED: Additional property settings for subscription EXT_STRING1 EXT_STRING2 EXT_INT1 VERSION CACHE_VERSION COMPOSITE_NAME DOMAIN_NAME COMPONENT_NAME Composite Name Application Name Component Name COMPOSITE_LABEL COMPOSITE_REVISION Table 15: DOCUMENT_CI_REF DOCUMENT_CI_REF Column CIKEY DOCUMENT_ID Description CUBE_INSTANCE.CIKEY DOCUMENT_TYPE Table 16: DOCUMENT_DLV_MSG_REF DOCUMENT_DLV_MSG_REF Column Description MESSAGE_GUID DOCUMENT_ID PART_NAME DOCUMENT_TYPE Table 17: WORK_ITEM WORK_ITEM Column CIKEY Description CUBE_INSTANCE.CIKEY 62
  • 63. NODE_ID SCOPE_ID COUNT_ID Part of work item composite key, identifier for bpel activity that this work item created for Part of work item composite key, identifier for internal scope that this work item created for (note this is not the scope declared in bpel, the engine has an internal scope tree that it creates for each instance, bpel scopes will map to an internal scope but there will be other internal scopes that have no mapping to the bpel definition) Part of work item composite key, used to distinguish between work items created from same activity in the same scope. CREATION_DATE CREATOR MODIFY_DATE Date work item was last modified MODIFIER STATE Current state of work item 0: STATE_INACTIVE: An activity that has just been created. This state is transient and is not persisted in the database. 1: STATE_OPEN_ACTIVE: An activity that has been persisted in the database (activated) and may be acted upon by a performer. 2: STATE_OPEN_SUSPENDED: An activity that has been suspended. Performers assigned to this activity will not be able to modify this activity until it has been resumed. 3: STATE_OPEN_PENDING_COMPLETE: An activity that has started to be performed (by a remote asynchronous performer) and is waiting for a callback from the performer to signal that it is complete. 4: STATE_OPEN_FAULTED: An activity that has thrown an exception but has not yet been closed. An activity that has thrown an exception cannot be closed until an enclosing block that can handle the exception has been found. 5: STATE_CLOSED_COMPLETED: An activity that has been successfully completed without error by a performer. Activities that are completed may be compensated if an exception in a block causes all activities to be rolled back. 6: STATE_CLOSED_FINALIZED: An activity that has been successfully finalized. Once an activity has been completed, all dependencies to the performer are removed; the finalized state is available for the system to perform any last-minute actions on the activity. 7: STATE_CLOSED_PENDING_CANCEL: An activity that has started its cancellation procedure. Since cancelling an activity may involve a great deal of business logic, the amount of time the entire cancellation process may take may be anywhere 63
  • 64. TRANSITION EXCEPTION EXP_DATE EXP_FLAG PRIORITY LABEL CUSTOM_ID COMMENTS from seconds to days. During this time, the activity is said to be pending cancellation; an activity may not be acted upon during this time. 8: STATE_CLOSED_CANCELLED: An activity that has been cancelled due to scope closure. If a scope is closed due to either a successful unti or handleException call on the parent block, all activities created within the enclosed blocks must be cancelled. Cancelled activities cannot be compensated like completed activities. 9: STATE_CLOSED_FAULTED: An activity that has thrown an exception and has been closed as a result. Once the thrown exception has been handled by an enclosing block the activity that threw the exception is marked as <code>STATE_CLOSED_FAULTED while those activities that were closed as a result of an enclosing block closure are transitioned to STATE_CLOSED_CANCELLED. 10: STATE_CLOSED_ABORTED: An activity that has been aborted due to administrative control. The performer of the activity will not be contacted in this case; abort is available only as an administrative function 11: STATE_CLOSED_COMPENSATED: An activity that has been successfully completed but must be compensated due to an exception in a parent block. Once an activity has been compensated, it cannot be moved to another state; activities cannot be undone/redone. 12: STATE_CLOSED_STALE: An activity who's process has been changed since the activity's instance was last accessed. No actions may be performed on the activity or the instance. Internal use, used by engine for routing logic no longer used expiration date for this work item; wait, onAlarm activities are implemented as expiration timers set if a work item has been called back by the expiration agent (expired). - priority of work item, user specified, no engine impact current label (user specified, no engine impact) custom identifier (user specified, no engine impact) comment field (user specified, no engine impact) REFERENCE_ID IDEMPOTENT_FLAG - internal use EXECUTION_TYPE FIRST_DELAY DELAY EXT_STRING1 EXT_STRING2 64
  • 65. EXT_INT1 CLUSTER_NODE_ID VERSION CLUSTER_NODE_KEY Table 18: XML_DOCUMENT XML_DOCUMENT Column Description DOCUMENT_ID DOCUMENT DOCUMENT_BINARY_FORMAT DOCUMENT_TYPE Table 19: XML_DOCUMENT_REF XML_DOCUMENT_REF Column Description DOCUMENT_ID COMPOSITE_INSTANCE_ID COMPONENT_INSTANCE_ID COMPOSITE_DN COMPONENT_NAME Table 20: HEADERS_PROPERTIES HEADERS_PROPERTIES Column Description MESSAGE_GUID COUNT_ID BIN_CSIZE BIN_USIZE BIN MODIFY_DATE Table 21: CLUSTER_MASTER CLUSTER_MASTER Column Description NODE_ID DUMMY_COL COMPONENTTYPE 65
  • 66. Table 22: CLUSTER_NODE CLUSTER_NODE Column Description NODE_ID IP_ADDRESS LAST_UPDATE 5.2 Purge BPEL PM is a database application and stores lot of transaction data in various tables of SOAINFRA schema. As data in various tables under SOAINFRA grow, BPEL PM slows down. To maintain an optimum performance, SOAINFRA schema must be purged on regular basis. Depending upon business requirements, purging basis can be: Duration for which data can be kept in database Maximum size of database State of composites Specific composites Combination of database size, duration, state of composite, and specificity of one or more composites After purging, reclaim the space and build indexes. Also after purging collect stats manually using DBMS_STATS.GATHER_TABLE_STATS procedure. There is no easy formula to calculate the right database size and based on a trial and error during LnP testing and over the time period in production environment. Below are the few pointers which guide the database size: • • • Inflow of data into the server is one of the most significant factors – Determination of this value should consider multiple factors like average data generation during normal days, lean days (holiday season), busy days (quarter/yearend), load on specific composite, etc. Retention Policy – There are legal, business requirements, company policy etc. which govern the retention policy of historical data. It must be given due thought. Long Running instance – There may be instances which remain open beyond the retention/maintenance cycle. Purging strategy must keep in mind that retention period should be greater than the period of longest running composite. However, sometimes it may not be possible to have a very long retention period and purging will have to be performed. In those scenarios, there is a concept in fusion called, “row migration” which moves old running instances into a different partition, allowing old partitions to be deleted. However, best effort should be made to avoid this scenario. 5.3 Partitioning BPEL PM is instrumented with partition keys. Partitioning action enables the schema tables to be range-partitioned on time intervals. 66
  • 67. For performance reasons, the BPEL PM schema has no foreign key constraints to enforce referential integrity. Absence of referential integrity discounts the usage of referential partitioning. Referential partitioning provides significant benefits because it equipartitions master and detail tables across foreign key constraints. Equipartioning means that the associated dependent table rows are in a database partition with the same partition key interval as their master table rows. Although referential partitioning feature cannot be used, but similar behavior can be mimicked to achieve some of the benefits. The BPEL PM and SOA Infrastructure components ensure that the partition key of every detail table row is the same as the partition key of its master table row (that is, the date (timestamp) that is the partition key is pushed down). To get full benefit of equipartitioning, DBA must ensure that the master and detail tables are range-partitioned on the same intervals. The following factors should be considered when selecting the schema partition keys: • • • • • Convey or imply state (for example, completed) for referential integrity Allow range partitioning on time intervals for maintenance operations Be static to avoid row movement that may lead to unreferenced data Be static to avoid row movement when table maintenance operations are performed Provide performance benefits for console queries through partition pruning Partitioning is not configured by default; it is a post-installation step that must be performed manually. For portioning there are three possible strategies: • • • No partitioning: No tables of a service component/service engine are partitioned. Partial partitioning: Restrict partitioning to specific tables with a high growth rate. Complete partitioning: All tables of a service component/service engine are partitioned. 5.3.1 Partial Partitioning Table 23 lists the master and dependent tables that can be partitioned. Table 23: Partial Partitioning Master Table Dependent Table COMPOSITE_INSTANCE REFERENCE_INSTANCE CUBE_INSTANCE CUBE_SCOPE XML_DOCUMENT None One can partition any of the tables in Table 1 by following these constraints: • Always partition master table if dependent table is partitioned 67
  • 68. • • All tables should be equipartitioned along the same date ranges and the same name. Always partition the COMPOSITE_INSTANCE table. 5.3.2 Complete Partitioning For better performance, go for complete portioning. In this approach, most of the tables of SOAINFRA schema are partitioned. Table 24 lists the tables which must be portioned to get benefit of complete portioning. Table 24: Complete Partitioning Table Range Partition Key COMPOSITE_INSTANCE PARTITION_DATE REFERENCE_INSTANCE CPST_PARTITION_DATE COMPOSITE_INSTANCE_FAULT CPST_PARTITION_DATE COMPOSITE_SENSOR_VALUE CPST_PARTITION_DATE COMPONENT_INSTANCE CPST_PARTITION_DATE REJECTED_MESSAGE CREATED_TIME REJECTED_MSG_NATIVE_PAYLOAD RM_PARTITION_DATE INSTANCE_PAYLOAD CREATED_TIME COMPOSITE_INSTANCE_ASSOC CREATED_TIME CUBE_INSTANCE CPST_INST_CREATED_TIME CI_INDEXES CI_PARTITION_DATE CUBE_SCOPE CI_PARTITION_DATE DOCUMENT_CI_REF CI_PARTITION_DATE AUDIT_TRAIL CI_PARTITION_DATE AUDIT_DETAILS CI_PARTITION_DATE DLV_SUBSCRIPTION CI_PARTITION_DATE WORK_ITEM CI_PARTITION_DATE AUDIT_COUNTER CI_PARTITION_DATE WI_FAULT CI_PARTITION_DATE DLV_MESSAGE RECEIVE_DATE HEADERS_PROPERTIES DLV_PARTITION_DATE DOCUMENT_DLV_MSG_REF DLV_PARTITION_DATE XML_DOCUMENT DOC_PARTITION_DATE 6 MDS Schema Tuning Fusion Midddleware might have database or file based repository. In this book, only data based repository is considered. MDS Schema tables contain META data about current SOA component deployment as well as composites deployed. 68
  • 69. Table 25: MDS_NAMESAPCES MDS_NAMESAPCES Column Description NS_PARTITION_ID NS_ID NS_URI Full path to name space URI Table 26: MDS_PARTITIONS MDS_PARTITIONS Column Description PARTITION_ID PARTITION_NAME PARTITION_LAST_PURGE_TIME Name of the SOA suite component deployed on this MDS Last purge date PARTITION_MT_STATE Table 27: MDS_PATHS MDS_PATHS Column PATH_PARTITION_ID PATH_NAME Description MDS_PARTITIONS.PARTITION_ID PATH_DOCID Acts as primary key PATH_OWNER_DOCID PATH_FULLNAME MDS_PATHS.PATH_DOCID Full file path where this document can be found PATH_GUID PATH_TYPE DOCUMENT: File which is referred using PATH_FULLNAME PACKAGE: Folder which is referred using PATH_FULLNAME PATH_LOW_CN PATH_HIGH_CN PATH_CONTENTID PATH_DOC_ELEM_NSURI PATH_DOC_ELEM_NAME PATH_VERSION PATH_VER_COMMENT PATH_OPERATION PATH_XML_VERSION PATH_XML_ENCODING PATH_CONT_CHECKSUM PATH_LINEAGE_ID PATH_DOC_MOTYPE_NSURI PATH_DOC_MOTYPE_NAME PATH_CONTENT_TYPE ENTERPRISE_ID Equivalent to Tenant I in various tables of SOAINFRA schema 69
  • 70. 6.1 Purging Every time a composite is deployed, artifacts such as process definitions etc. are stored in MDS as a new version. Purge MDS database on regular basis. For purging of MDS use one of the following: • • • WSLT SQL queries (assuming repository is databases based) FMC Steps for purging MDS via FMC: 1. Login to FMC 2. Navigate <<FarmName>> SOA soa-infra (<<managedServername>>) Administration MDS Configuration Exhibit 41: MDS Purging - 1 70
  • 71. 3. At the bottom of right hand side panel, choose number of days to purge. Exhibit 42: MDS Purging - 2 4. Click on Purge button. 6.2 Statistic Collection After purging MDS database, perform manual statics collection. Note: Ensure auto collection of statics is enabled. 6.3 Optimizing Path_FullName table In most cases, the first 32 characters of content of PATH_FULLNAME column in the MDS_PATHS table are the same. One can prevent the database putting them in the same section of the histogram by: • Drop the histogram for PATH_FULLNAME column (execute following query as system) execute dbms_stats.delete_column_stats(ownname=>'mdsSchemaOwner', tabname=>'MDS_PATHS', colname=>'PATH_FULLNAME', col_stat_type=> 'HISTOGRAM') Snippet 2: Drop Histrogram • Set table preferences to exclude collecting histogram for the PATH_FULLNAME column. execute dbms_stats.set_table_prefs(mdsSchemaOwner, 'MDS_PATHS', 'METHOD_OPT', 'FOR COLUMNS SIZE 1 PATH_FULLNAME') Snippet 3: Set Table Preferences 71
  • 72. 7 Technology Adapters 7.1 File and FTP Adapter In File and FTP adapter various properties can be used to tune. Tuning efforts can be divided into three distinct efforts: Threads Inbound Throttling Outbound Throttling Outbound Performance Best Practices File and FTP adapters may open large number of files at a given point of time. To support huge number of open files, set the number of open files for operating system sufficiently high. For example, to set the number of open files parameter to 9216 for Linux, use the ulimit -n 9216 command. 7.1.1 Threads File/FTP adapter's threading model is a bit complex. There are separate poller and processor threads, except in the "Single Threaded Model" (JMS/AQ adapters always use the same thread to poll and process). There is always only one poller thread, while there could be multiple processor threads. Step 1: Choose a threading model • • • Default Threading Model Single Threaded Model Partitioned Threaded Model Step 2: Configure threads depending on the threading model Default Threading Model: Set the thread count of global processor through the oracle.tip.adapter.file.numProcessorThreads property at the pc.properties file. This pc.properties is read from the classpath. However, the Partition Threading Model is recommended over the Default Threading Model if one needs to define processor threads. Single Threaded Model: Set the SingleThreadModel=true at the inbound jca file. <activation-spec className="oracle.tip.adapter.file.inbound.FileActivationSpec"> <property../> <property name="SingleThreadModel" value="true"/> <property../> 72
  • 73. </activation-spec> Snippet 4: Single Threaded Model - jca file Partitioned Threaded Model: The partitioned threaded model is a modified threaded model in which the in-memory queue is partitioned and each composite application receives its own inmemory queue. The File and FTP Adapter is enabled to create its own processor threads rather than depend on the global pool of processor worker threads for processing the enqueued files. Set the thread count for processor threads per adapter at the inbound jca file. <activation-spec className="oracle.tip.adapter.file.inbound.FileActivationSpec"> <property../> <property name="ThreadCount" value="5"/> <property../> </activation-spec> Snippet 5: Partitioned Threaded Model - jca file The value of the ThreadCount is closely related to the kind of threading model chosen: • • • If ThreadCount = 0, then the threading behavior is like single threaded model. If the ThreadCount = -1, then the global thread pool is used, as in the default threading model. The maximum value for the ThreadCount property is 40. 7.1.2 Inbound Throttling The File and FTP Adapters provide parameters that can be used to throttle the inbound operations. Table 28: File & FTP Adapter - Inbound Throttling Parameter MaxRaiseSize Type JCA Values <property name="MaxRaiseSize" value="100"/> Default: 10,000 Description This parameter defines the maximum number of files that the inbound adapter would submit for processing on each polling cycle. For example, if inbound directory has 1000 files and the MaxRaiseSize is set to 100, the adapter can increase to 100 files on each polling cycle. Defined in the Inbound JCA File. SingleThreadModel JCA <property name="SingleThreadModel" If the value is true, the poller lists, translates, or publishes files 73
  • 74. Parameter Type Values value="true"/> Default: False (The global inmemory queue is used). Description in the same thread. In other words, it does not use the global in-memory queue for publishing. Defined in the Inbound JCA File. ThreadCount JCA <property name="ThreadCount" value="10"/> Default: -1 (The adapter uses the global thread pool and inmemory queue) This parameter enables the File and FTP Adapters to create their own processor threads rather than depending on the global pool of processor worker threads for processing the enqueued files. This parameter partitions the inmemory queue and each composite application receives its own in-memory queue. If the ThreadCount is set to 0, then the threading behavior is the same as that of the SingleThreadModel. If the ThreadCount is set to -1, then the global thread pool is activated, which is the same as the Default Threading Model. The maximum value that can be set for ThreadCount is 40. Defined in the Inbound JCA File. 7.1.3 Outbound Throttling The File and FTP Adapter provide parameters that can be used to throttle the outbound operations. Table 29: : File & FTP Adapter - Outbound Throttling Parameter ConcurrentThreshold Type JCA Value <property name="ConcurrentThreshold" value="100"/> Default: 20 (Not more than 20 Description This parameter specifies the maximum number of translation activities that are allowed to start in parallel 74
  • 75. Parameter Type Value translations occur for a particular outbound scenario). Description for a particular outbound scenario. The translation step during the outbound operation is CPU intensive and must be monitored as it might cause other applications or threads to starve. The maximum value is 100. Defined in the Outbound JCA File. 7.1.4 Outbound Performance Best Practices The File and FTP Adapters provide parameters that can be used to tune the performance of outbound operations. Table 30: : File & FTP Adapter - Outbound Best Practices Parameter UseStaging Type JCA Value <property name="UseStaging" value="true"/> Default: True Description If the parameter is set to true, then the outbound File or FTP Adapter writes translated data to a staging file and later streams the staging file to the target file. If the parameter is set to false, then the outbound File or FTP Adapter does not use an intermediate staging file. Defined in Outbound JCA File. serializeTranslat Endpoi <reference If True, then the 75
  • 76. Parameter Value nt Propert y name="PurchaseOrderOut"> <interface.wsdl interface="...."/> <binding.jca config="PurchaseOrderOut_ftp.jca"/ > <property name="serializeTranslation" type="xs:string" many="false" source="" override="may">true</property> </reference> translation step is serialized using a semaphore. The number of permits for semaphore (monitoring the translation step) comes from Defaults: ion Type ConcurrentThresh old parameter • • True (If the value of UseStaging is set to True) False (If the value of UseStaging is set to False) Description (listed in the preceding table). The default value of True is used because the translation step is CPU intensive and certainly other applications should not be starved of threads. If False, then the translation step occurs outside the semaphore. Defined in Binding property for reference in composite.xml. inMemoryTranslati on Binding Propert y <reference name="PurchaseOrderOut"> <interface.wsdl interface="...."/> <binding.jca config="PurchaseOrderOut_ftp.jca"/ > <property name="inMemoryTranslation" type="xs:string" many="false" source=""override="may">false</pro perty> </reference> Default: False This parameter is applicable only if UseStaging is False. If True, then the translation step occurs in-memory (an in-memory byte array is created.) If False, then the 76
  • 77. Parameter Type Value Description adapter creates an output stream to the target file (FTP, FTPS, and SFTP included) and allows the translator to translate and write directly to the stream. Defined in Binding property for reference in composite.xml. 7.1.5 Tuning number of files to be processed at a time One may like to make sure that only one file is processed at a time and the first process is finished before the second process is started to throttle a composite. This can achieve by setting two properties: • • MaxRaiseSize: To specify that only one file should be picked during polling cycle PollingFrequency: It will sufficient time to first process to complete, before the second one starts. <property name="MaxRaiseSize" value="1"/> <property name="PollingFrequency" value="10"/> Snippet 6: Tuning number of files to be processed at a time 7.2 Database Adapter In database adapter one should strive to reduce the number of round trips to database and reduction in network cost of each trip. 7.2.1 Basic considerations 7.2.1.1 Use Indexes Indexes improve performance of selects, updates and deletes. Index all queried fields, such as the primary key and the MarkReadField of the LogicalDeletePollingStrategy, when polling. For MarkReadField specify a non-null MarkUnreadValue. 77
  • 78. Note: An index on a column containing many nulls may revert to full table scans. 7.2.1.2 Disable OptimizeMerge The OptimizeMerge parameter allows the detection of XML elements for which no value was specified. The related columns are excluded from inserts and updates. Disabling this parameter generally improves performance, but there is one case where it could have a negative effect. If multiple rows are being passed in as a single XML, and each row has different columns set (user entered with many optional fields), there is no benefit from batch writing, as each insert or update is different. 7.2.1.3 Increase MaxRaiseSize The MaxRaiseSize parameter indicates the maximum number of XML records that can be raised at a time to the BPEL engine. For example, if MaxRaiseSize = 10, then 10 database records are raised simultaneously. On an inbound read, for example, MaxRaiseSize = 0 (unbounded) means that if adapter reads 1000 rows, it will create one XML with 1000 elements. These elements are passed through a single BPEL PM instance. A merge on the outbound side can then take all 1000 in one group and write them all at once with batch writing. Use the MaxRaiseSize parameter for publishing large payloads. 7.2.1.4 Increase MaxTransactionSize MaxTransactionSize property controls the number of records processed per transaction by each thread. If set to a large value such as 1000, turning on the UseBatchDestroy option could have a negative impact on performance. Setting a large MaxTransactionSize and a small MaxRaiseSize could also have negative impact on performance. Best practice is maintaining up to a 10:1 ratio in a synchronous scenario and tries to maintain 1:1 ratio with MaxRaiseSize. For example, if MaxRaiseSize=20 and MaxTransactionSize = 100 then there will be 5 XML files created each containing 20 records and they will be processed in one transaction. 7.2.1.5 Enable UseBatchDestroy This property controls how the processed records are updated (ex: Deleted for DeletePollingStrategy, MarkedProcessed for LogicalDeleteStrategy). If set, only one update/delete is executed for all the rows that are part of that transaction. The number of rows in a transaction is controlled by the MaxTransactionSize option. This may not always offer an improvement because, by default, batch writing is used, which also ends up in a single round trip to the database. 78
  • 79. 7.2.1.6 Enable Batch Reading Batch reading of one-to-many and one-to-one relationships is on by default. One can also use joined reading for one-to-one relationships instead, which may offer a slight improvement. 7.2.1.7 Disable Delete Polling Strategy Avoid the delete polling strategy because it individually deletes each row. The sequencing polling strategy can destroy 1000 rows with a single update to a helper table. LogicalDelete is better than Delete, as updates are typically faster than deletes. To maintain performance, however, ensure that table is indexed. If table is not indexed, keep the total number of rows small by using deletes. In some cases deletes may be faster as the cost of a full table scan is negligible. 7.2.1.8 PollingInterval Indicates the number of seconds between queries to the database for new events. 7.2.1.9 Use Synchronous Processes On BPEL one can configure Database Adapter processes to be synchronous. One can also create sequential routing rules in Mediator. This can improve throughput in database-to-database scenarios, as there is less instance processing impact. 7.2.1.10 Use Insert The insert operation is the most performant because it uses no existence check and has no extra performance impact associated with it. There are no reads, only writes. If process is inserting most of the time, use insert, and catch a unique key constraint SQL exception inside BPEL process, which can then perform a merge or update instead. 7.2.1.11 Disable Merge Merge executes one extra SELECT per related table. The SELECT is used to determine whether each row should be inserted or updated. If the row is updated, the update performed is minimal. If no rows have changed, nothing is updated. 7.2.1.12 Use Connection Pooling The adapter should point to a tuned data source connection pool. Tuning the connection pool is important because creating and tearing down database connections can impact performance. 7.2.1.13 Use Attribute Filtering On the Attribute Filtering page of the Adapter Configuration Wizard one can choose which fields to map to the XML and vice versa. Performance in improved by deselecting columns that are not needed for particular business case, especially large columns like LOBs. 79
  • 80. 7.2.1.14 Use Native Sequencing If XSL functions are used to assign primary keys to records, consider using the built-in native sequencing support in the adapter. Sequencing support obtains and caches 50 keys at a time by default. Caching improves performance by reducing the number of round trips. The chunk size can be controlled incrementally by modifying the sequencePreallocationSize connector property. 7.2.1.15 Do not use primary or foreign keys on the database Using primary and foreign keys can impact performance. Avoid using them when possible. 7.2.1.16 JDBC Driver Class The default JDBC driver class used to create the physical database connections in the connection pool is oracle.jdbc.xa.client.OracleXADataSource. Changing the driver to oracle.jdbc.OracleDriver may provide some performance improvement. 7.2.2 Existence Checking One method of performance optimization for merge is to eliminate check database existence checking. The existence check is marginally better if the row is new, because only the primary key is returned, not the entire row. Due to the nature of merge, however, if the existence check passes, the entire row must be read to calculate what changed. Therefore, for every row to be updated, one extra round trip to the database during merge. Use check cache on the root descriptor/table and any child tables if A is master and B is a privately owned child. If A does not exist, B cannot exist. And if A exists, all of its child tables are loaded as part of reading A. Note: One way to prevent merge from performing an existence check for every record, when insert is required, is to set the primary key to null. 7.2.3 Throttling It is possible to configure a speed limit on Database Adapter performance to protect downstream components from message bursts. Consider leaving burst records unprocessed on the source database until SOA can process them efficiently. One can set the inbound Database Adapter property RowsPerPollingInterval. It acts as a limit on the number of records which can be processed in one polling interval. The default is unlimited. Number of active nodes in cluster = n Number of Threads = m RowsPerPollingInterval = p PollingInterval = q 80
  • 81. Maximum Rows per second = n*m* (p/q) MaxTransactionSize can be thought of as RowsPerDatabaseTransaction or DatabaseFetchSize. It does not affect how many rows can be processed in one polling interval period. The one exception is the following configuration: -distributed polling checked, usesSkipLocking="false" In this one case RowsPerPollingInterval will default to MaxTransactionSize instead of unlimited. If RowsPerPollingInterval is set to lower than MaxTransactionSize or MaxRaiseSize, they will be effectively lowered to RowsPerPollingInterval. There is no UI support for RowsPerPollingInterval. In db.jca file for the inbound polling service, add the RowsPerPollingInterval property manually. Add it to the same section as the properties MaxRaiseSize, MaxTransactionSize, and PollingIntervalin any order. 7.2.4 Adapter Threads While setting up threads for Database Adapter, one needs to consider multiple factors. Factor 1: In clustered environment while configuring Database Adapter, check the Distributed Polling check box in the Adapter Configuration Wizard and set MaxTransactionSize . One can increase concurrency by setting the adapter_db.JCA property NumberOfThreads. To avoid data duplication in clustered environment ensures Distributed Polling check box is checked. Distributed Polling ensures usage of syntax SELECT FOR UPDATE SKIP LOCKED in case of Oracle database and SELECT FOR UPDATE in case of non-Oracle databases. In both cases, concurrent threads will each try to select and lock the available rows, but the locks are only obtained on fetch. If an about to be fetched row is already locked, the next unlocked row will be locked and fetched instead. If many threads all execute the same polling query at the same time, they should all relatively quickly obtain a disjoint subset of unprocessed rows. Formerly, the best practice for multiple Database Adapter process instances deployed to multiple BPEL PM nodes was using LogicalDeletePollingStrategy or DeletePollingStrategy with a unique MarkReservedValue on each polling node, and setting MaxTransactionSize. But introduction of skip locking (since release 1, 11.1.1.5.0), this approach has been superseded. 81
  • 82. If Logical Delete polling is used and MarkReservedValue is set, skip locking will not be used The benefits of using skip locking over a reserved value include: • • Skip locking scales better in a cluster and under load. All work is in one transaction (as opposed to update/reserve, then commit, then select in a new transaction), so the risk of a non-recoverable situation in an HA environments is minimized. There is no need to specify MarkReservedValue using complex variable (e.g. R${weblogic.Name-2}-${IP-2}-${instance}). Factor 2: Set NumberOfThreads property in .jca file. Do not set activationInstances (configured in composite.xml). In clustered environment activationInstances sets number of instances of Database Adapters per node. Number of BPEL servers in the cluster = n NumberOfThreads = m activationInstances = p Total number of threads = n*m*p Using activationInstances creates extra work instances outside of Database Adapter, so will not cooperate. Hence, in a multi-threaded single node scenario, always configure NumberOfThreads only. Without database level concurrency control through enabling distributed polling, duplicates will be read. It is recommended to use only NumberOfThreads and disregard activationInstances. 7.3 JMS Adapter To tune a JMS adapter, one can tune following parameters of database adapter 7.3.1 Receive Threads In composite.xml, one can specify that how many threads of JMS adapter will spun to pick data from a queue: <service name="dequeue" ui:wsdlLocation="dequeue.wsdl"> <interface.wsdl interface="http://xmlns.oracle.com/pcbpel/adapter/jms/textmessageusingqueu es/textmessageusingqueues/dequeuewsdl.interface(Consume_Message_ptt)"/> 82
  • 83. <binding.jca config="dequeue_jms.jca"> <property name="adapter.jms.receive.threads" type="xs:string" many="false">10</property> </binding.jca"> </service> Snippet 7: JMS Adapter - Receive Thread - composite.xml 7.4 AQ Adapter To tune a AQ adapter, one can tune following parameters of AQ adapter 7.4.1 Dequeue Threads In composite.xml, one can specify that how many threads of AQ adapter will spun to pick data from a AQ: <service name="dequeue" ui:wsdlLocation="dequeue.wsdl"> <interface.wsdl interface="http://xmlns.oracle.com/pcbpel/adapter/aq/raw/raw/dequeue/#wsdl.in terface(Dequeue_ptt)"/> <binding.jca config="dequeue_aq.jca"> <property name="adapter.aq.dequeue.threads" type="xs:string" many="false">10</property> </binding.jca> </service> Snippet 8: AQ Adapter - Dequeue Threads - composite.xml 7.4.2 Dequeue Threads and Number of database connection While tuning AQ adapter, one need to adjust database connection pool size as per the number of deqeue threads, and managed servers in cluster. Number of managed servers on which BPEL PM is running = n Number of deqeue threads for a specific AQ = m Maximum capacity of a connection pool >= m*n Data sources under consideration = 2 (SOADataSource and SOALocalTxDataSource) Maximum number of sessions allowable in database ( for AQ dequeing) >= 2*m*n 7.5 MQ Adapter 7.5.1 Dequeue Threads Using InboundThreadCount property in .jca file one can control number of threads to dequeue the messages from a queue. InboundThreadCount='N' 83
  • 84. In the above snippet, N is the number of threads that will spun to dequeue the messages from the queue. 7.6 Socket Adapter Performance can be optimized for the Socket Adapter using Connection Pool if the socket server connecting to does not close the socket with each interaction. Connection pool let’s use a socket connection repeatedly, avoiding the overload of creating a new socket for each interaction. Note: The Connection Pool feature is applicable to outbound interactions only. In order to enable the connection pool feature for the Socket Adapter, the KeepAlive connection factory property must be set to True. This connection property can be modified using the Connection Pool tab of WLS Administration Console. 8 BPEL PM – Miscellaneous properties 8.1 Instance Key Block Size The InstanceKeyBlockSize property controls the instance ID range size. BPEL Server creates instance keys (a range of process instance IDs) in batches using the value specified. After creating this range of in-memory IDs, the next range is updated and saved in the ci_id_range table. For example, if instanceKeyBlockSize is set to 1000, BPEL Server creates a range of instance keys in-memory (1000 keys, which are later inserted into the cube_instance table as cikey). To maintain optimal performance, ensure that the block size is larger than the number of updates to the ci_id_range table. The default value is 10000. 8.2 Automatic Recovery Attempts The MaxRecoverAttempt parameter allows to configure the number of automatic recovery attempts to submit in the same recoverable instance. The value specifies the maximum number of times invoke and callback messages are recovered. Once the number of recovery attempts on a message exceeds the specified value, a message is marked as nonrecoverable. When a BPEL instance makes a call to another server using invokeMessage, and that call fails due to a server down, validation error, or security exception, the invokeMessage is placed in a recovery queue and BPEL attempts to retry those messages. When there are many messages, and a majority of them are being sent to the same target, the target can become overloaded. Setting the appropriate value of MaxRecoveryAttempt will prevent excessive load on servers that are targeted from BPEL web service calls. 84
  • 85. 8.3 Disable BPEL Monitors and Sensors Disable this in case if BPEL monitors and sensors are not used in processes/composites and use an alternate mechanism such as the BAM Adapter. 9 Best practices: BPEL process/composite/component 9.1 Large Payloads In BPEL Process when XML payload is increased (typically from 10MB on ward) and especially during busy hours, one can notice performance deterioration and/or java.lang.OutOfMemoryError. From version 11.1.1.4 the streamResultToTempFile property has been introduced. This property enables XSLT results to be streamed to a temporary file and then loaded from the temporary file. Set streamResultToTempFile to yes when processing large payload using XSLT. The default value is no. This property is applicable when using the following BPEL XPath functions: ora:processXSLT('template','input','properties'?) ora:doXSLTransformForDoc ('template','input','name', 'value') Following steps will enable to configure large XML documents to be processed using XSLT: 1. Create a BPEL common properties schema. <?xml version="1.0" encoding="UTF-8"?> <xs:schema targetNamespace ="http://schemas.oracle.com/service/bpel/common" xmlns:common = "http://schemas.oracle.com/service/bpel/common" xmlns:xs = http://www.w3.org/2001/XMLSchema elementFormDefault="qualified" blockDefault="#all"> <xs:element name="serviceProperties" type="common:PropertiesType"/> <xs:element name="anyProperties" type="common:ArrayOfNameAnyTypePairType"/> <xs:complexType name="NameValuePairType"> <xs:sequence> <xs:element name="name" type="xs:string"/> <xs:element name="value" type="xs:string"/> </xs:sequence> </xs:complexType> <xs:complexType name="ArrayOfNameValuePairType"> <xs:sequence> <xs:element name="item" type="common:NameValuePairType" maxOccurs="unbounded"/> </xs:sequence> </xs:complexType> <xs:complexType name="NameAnyTypePairType"> <xs:sequence> 85
  • 86. <xs:element name="name" type="xs:string"/> <xs:element name="value" type="xs:anyType"/> </xs:sequence> </xs:complexType> <xs:complexType name="ArrayOfNameAnyTypePairType"> <xs:sequence> <xs:element name="item" type="common:NameAnyTypePairType" maxOccurs="unbounded"/> </xs:sequence> </xs:complexType> <xs:complexType name="PropertiesType"> <xs:sequence> <xs:element name="property" type="common:NameValuePairType" maxOccurs="unbounded"/> </xs:sequence> </xs:complexType> <xs:complexType name="ArrayOfAnyTypeType"> <xs:sequence> <xs:element name="item" type="xs:anyType" maxOccurs="unbounded"/> </xs:sequence> </xs:complexType> </xs:schema> Snippet 9: common properties schema - 1 2. Within a BPEL process, add the namespace in the import section. xmlns:common = "http://schemas.oracle.com/service/bpel/common" 3. Create a global variable (for this example, named propertiesXMLVar) <variable name="propertiesXMLVar" element="common:anyProperties"/> 4. Set the streamResultToTempFile property to yes. This assign activity should exist before using performing an XSLT transformation. <assign name="Assign_xsltprop"> <copy> <from> <common:anyProperties> <common:item> <common:name>streamResultToTempFile</common:name> <common:value>yes</common:value> </common:item> </common:anyProperties> </from> <to variable="propertiesXMLVar"/> </copy> </assign> Snippet 10: common properties schema - 2 86
  • 87. 9.2 Persist only the faulted BPEL instances To persist only the faulted BPEL instances, inMemoryOptimization should be set to ‘true’ and completionPersistPolicy to ‘faulted’ at component level. When 'inMemoryOptimization set to ‘true’, the completionPersistPolicy determines persistence behavior. When set to ‘false’, dehydration is disabled which improves performance. completionPersistPolicy property can only be used when inMemoryOptimization is set to be ‘true’. Following are the possible values for completionPersistPolicy property: Table 31: completionPersistPolicy property Value On (default) Description The completed instance is saved normally Deferred The completed instance is saved, but with a different thread and in another transaction. Faulted Only the faulted instances are saved. Note: When an unhandled fault occurs, regardless of these flags, audit information of the instance is persisted within cube_instance table. Off No instances of this process are saved. <property name="bpel.config.inMemoryOptimization">true</property> <property name="bpel.config.completionPersistPolicy">Faulted</property> Snippet 11: bpel.xml Also, one needs to set auditLevel property in composite.xml as ‘Off’. This property is at component level. <component name="HelloWorld"> <implementation.bpel src="HelloWorld.bpel" /> <property name="bpel.config.auditLevel">Off</property> </component> Snippet 12: composite.xml 9.3 Do not validate incoming XML To enhance performance, do not validate incoming XML message against schema for a partner link. One should be aware of risk of not validating incoming XML message. Message may lands 87
  • 88. up as rejected message in best case scenario and may pose security threat in worst case scenario. This property is set at partner link level. In composite.xml set validateSchema property to false. <property name="validateSchema" type="xs:boolean" many= "false">false </property> Table 32: validateSchema value Value false Description Do not validate incoming XML against schema (default) true BPEL engine validates the XML message against the XML schema during receive and invoke for this partner link. If the XML message is invalid then bpelx:invalidVariables run time BPEL Fault is thrown. This overrides the domain level validateXML property. 9.4 Idempotenency An idempotent activity is an activity that can be retried (e.g. assign activity or invoke activity). BPEL Server saves the instance after a non-idempotent activity. This property is applicable to both durable and transient processes. This activity is defined at partner link level. Table 33: Idempotency value Value True (default) Description If BPEL Server fails, it performs the activity again after restarting. This is because the server does not dehydrate immediately after invoke and no record exists that the activity executed. Some examples of where this property can be set to True are: read-only services or local EJB/WSIF invocations that share the instance's transaction. False Activity is dehydrated immediately after execution and recorded in the dehydration store. When idempotent is set to False, it provides better failover protection, but may impact performance if the BPEL process accesses the dehydration store frequently. 88
  • 89. 9.5 nonBlockingInvoke By default, BPEL PM executes in a single thread by executing the branches sequentially instead of in parallel. When this property is set to True, the process manager creates a new thread to perform each branch's invoke activity in parallel. This property is applicable to both durable and transient processes. Consider setting this property to True if there are invoke activities in multiple flow or flow n branches. This is especially effective if the parallel invoke activities are two-way, but some benefits can be realized for parallel one-way invokes as well. Note: Invocations to the same partner link will happen in sequence and not in parallel. If different partner links are invoked each time with nonBlockingInvoke set to True, then each link will work in parallel even if all the partner links point to the same source. Table 34: nonBlockingInvoke value Value false Description BPEL Server executes the invoke activity in the single process thread. (default) true BPEL Server spawns a new thread to execute the invocation 10 Database Tuning Fusion Middleware heavily dependent upon Database for its operation. Performance of database is big factor in overall performance of BPEL PM. Database (Schema SOAINFRA and MDS) can be hosted in a RAC Configuration or non-RAC configuration. 10.1 Initialization Parameters The following table lists the database initialization parameter guidelines for SOA database. These parameter values are just for baseline purpose and need to be tuned depending upon specificity of various parameters affecting environmental conditions. Table 35: Database initialization parameters Parameter audit_trail plsql_code_type Description Enables or disables database auditing. Disabling (NONE) audit trail can impact performance. Default value: DB Specifies the compilation mode for PL/SQL library units. • INTERPRETED: PL/SQL library units are compiled to PL/SQL 89
  • 90. bytecode format. Such modules are executed by the PL/SQL interpreter engine. • NATIVE: PL/SQL library units are compiled to native (machine) code. Such modules are executed natively without incurring any interpreter impacts. For performance perspective NATIVE is preferred value. nls_sort Default value: INTERPRETED Specifies the collating sequence for ORDER BY clause. BINARY: The collating sequence for ORDER BY queries is based on the numeric value of characters (a binary sort that requires fewer system resources). If the value is a named linguistic sort (e.g. AMERICAN), sorting is based on the order of the defined linguistic sort. Most (but not all) languages supported by the NLS_LANGUAGE parameter also support a linguistic sort with the same name. For performance perspective BINARY is preferred value. open_cursors Default value: Derived from NLS_LANGUAGE Specifies the maximum number of open cursors a session can have at once. While setting value here one must take consideration values of Statement Cache Size and Pinned To Thread Property. One should start with 500. session_cached_cursors Default value: 50 Specifies the number of session cursors to cache. Repeated calls of the same SQL statement cause the session cursor for that statement to be moved into the session cursor cache. Subsequent calls find the cursor in the cache and do not reopen the cursor. Database uses a least recently used algorithm to remove entries in the session cursor cache to make room for new entries when needed. This parameter also constrains the size of the PL/SQL cursor cache which PL/SQL uses to avoid having to re-parse as statements are reexecuted by a user. One should start with 500. 90
  • 91. _b_tree_bitmap_plans Default value: 50 Enables use of bitmap access paths for b-tree indexes. Suggested value is FALSE. Processes Default value: TRUE Sets the maximum number of operating system processes that can be connected to Oracle concurrently. The value of this parameter must account for Oracle background processes. SESSIONS parameter is deduced from this value. Baseline value is in between 1500 to 5000. sga_target Default value: 100 Setting this parameter to a nonzero value enables Automatic Shared Memory Management. Prefer automatic memory management to simplify configuration and to improve performance. Baseline value is in between 2GB to 18GB. pga_aggregate_target Default value: 0 Specifies the target aggregate PGA memory available to all server processes attached to the instance. Baseline value is in between 1GB to 8GB. Memory_target Disk_asynch_io Default value is 0 Specifies the Database system-wide usable memory. The database tunes memory to the Memory_target value, reducing or enlarging the sga_target and pga_aggregate_target as needed. Start with setting the Memory_target to NONE. Set sga_target and pga_aggregate_target separately as setting Memory_target does not allocate sufficient memory to sga_target and pga_aggregate_target as needed. Controls whether I/O to data files, control files, and log files is asynchronous (that is, whether parallel server processes can overlap I/O requests with CPU processing during table scans. If platform supports asynch IO, prefer TRUE, otherwise FALSE. Filesystemio_options Default value: TRUE Specifies I/O operations for file system files. 91
  • 92. Suggested value: SETALL Secure_Files Default value: None Specifies how to store LOB objects from tables. Suggested value: ALWAYS Parallel_max_servers Job_queue_processes Default value: PERMITTED Specifies the maximum number of parallel execution processes and parallel recovery processes for an instance. As demand increases, Oracle Database increases the number of processes from the number created at instance startup up to this value Suggested value: Equivalent to NUM_CPU_CORES Specifies the maximum number of job slaves per instance that can be created for the execution of DBMS_JOB jobs and Oracle Scheduler (DBMS_SCHEDULER) jobs. DBMS_JOB and Oracle Scheduler share the same job coordinator and job slaves, and they are both controlled by the Job_queue_processes parameter. Suggested value: Equivalent to NUM_CPU_CORES 10.2 Huge Pages Without Huge Pages, the operating system keeps each 4KB of memory as a page, and when it is allocated to the SGA, then the lifecycle of that page (dirty, free, mapped to a process, and so on) is kept up to date by the operating system kernel. With Huge Pages, the operating system page table (virtual memory to physical memory mapping) is smaller, since each page table entry is pointing to pages from 2MB to 256MB. Also, the kernel has fewer pages whose lifecycle must be monitored. The advantages of using Huge Pages are: • • • • Increased performance through increased Translation Lookaside Buffer (TLB) hits. Pages are locked in memory and are never swapped out which guarantees that shared memory like SGA remains in RAM. Contiguous pages are preallocated and cannot be used for anything else but for System V shared memory (e.g. SGA) Less bookkeeping work for the kernel for that part of virtual memory due to larger page sizes The Automatic Memory Management (AMM) and Huge Pages are not compatible. With AMM the entire SGA memory is allocated by creating files under /dev/shm. When Oracle Database 92
  • 93. allocates SGA that way Huge Pages are not reserved. One must disable AMM on Oracle Database 11g to use Huge Pages. 10.3 DB Contention At run time, BPEL PM generates intense DML activity in the database which may lead to contention on database objects. 10.3.1 Wait events AWR report exposes wait events that are occurring in SOA database. Following are usual wait event: • • • • • • • • log file sync enq: HW – contention enq: TX – index contention enq: SQ – contention buffer busy waits Db file sequential read, db file scattered read gc buffer busy acquire, gc buffer busy release (RAC) DB CPU 10.3.1.1 log file sync SOA workload in the database suffers from redo log performance and observes “log file sync” event as one of the top events in AWR. The possible reasons for high “log file sync” waits are: a. LGWR is unable to complete writes fast enough due to: Disk I/O performance to log files is not good enough. LGWR is starving for CPU resources. b. LGWR is unable to post the processes fast enough, due to excessive commits. c. LGWR is suffering from other database contention such as enqueue waits or latch contention. To identify the root cause, query the wait events for LGWR using its SID. redo log sizing The size of the redo log files can impact performance, because the behavior of the database writer and archiver processes depend on the redo log sizes. Keeping the redo log file size too small would cause frequent checkpoints and log file switches and affects system performance. Start with 3 redo log groups with 2GB of size each and monitor the redo log performance. Adjust the number of redo log groups and size of each member to control the frequency of log switches and minimize system waits. 93
  • 94. A rough guide is to switch logs at most once every 20 minutes. For example, if online redo logs switch once every 5 minutes during peak database activity, to achieve the 20 minute guideline, the logs would each need to be 4 times larger than their current size. (i.e. 20 / 5 = 4). Place the redo log files on a disk separate from data files to improve I/O performance. SOAINFRA schema is highly write intensive which generates huge amount of redo per second and per transaction. Sometimes no amount of disk tuning may relieve redo log bottlenecks, because Oracle must push all updates, for all disks, into a single redo location. If AWR report indicates that foreground wait time for “log file sync” in top most events in AWR report than I/O bandwidth is an issue. One can consider using Solid State Disk redo log files. SSD has greater bandwidth than platter disk. redo log buffer tuning In BPEL PM most of the DML statements are committed in a row-by-row manner, not in batch mode. Redo log performance takes a hit because of frequent committing of transactions. The statistic 'redo buffer allocation retries' from AWR report or V$ views provides the number of times a user process waits for space in the redo log buffer. This statistic can also be queried through the dynamic performance view V$SYSSTAT. Following query can be used to monitor these statistics over a period while LnP is in progress: Select name, value, from V$SYSSTAT where name = 'redo buffer allocation retries' The value of redo buffer allocation retries should be near zero over an interval. If this value shows increment over time period, then processes are waiting for space in the redo log buffer. The wait may be due to log buffer being too small or by check pointing. The initialization parameter LOG_BUFFER sets the size (in Bytes) of redo log buffer. Also look into improving the check pointing or archiving process. Check whether the log buffer space waits event is not critical in the wait time; if not, the log buffer size is most likely sufficient. Excessive redo size can also cause high “log file sync” waits and hurts performance, so do not go overboard. One can start with 100 MB size and tune as required. 94
  • 95. There still one more knob to tinker with – priority of LGWR or priority class of LGWR. Increase priority of LGWR (using nice) or increasing priority class of LGWR to RT might provide some benefit. 10.3.1.2 enq: HW – contention The enq: HW – contention (a.k.a. HW High Water enqueue) occurs when competing processes are inserting into the same table and are trying to increase the high water mark of a table simultaneously. . In SOAINFRA schema, this issue is observed with respect to tables that have LOB columns. Under heavy load the LOB segments in these tables experience contention. The default storage for LOBs is BASICFILE (in 11g database) so the problem of HW contention arises. This type of contention can be eliminated using SecureFiles feature. Following tables may face this contention because they have LOB columns: Table 36: Contention tables Table ATTACHMENT AUDIT_DETAILS CUBE_SCOPE LOB Column ATTACHMENT BIN SCOPE_BIN Recommended LOB storage Attribute COMPRESS CACHE COMPRESS CACHE COMPRESS CACHE 10.3.1.3 enq: TX – index contention BPEL PM executes very high rate of insert statement which leads to increase in index keys and particularly primary key indexes. Indexes of a B*Tree structure will insert these keys targeting only a few database blocks which can become very active across a Real Application Cluster(RAC). This issue is observed in the AWR report as high “Buffer Busy waits”. When a transaction inserting a row in an index has to wait for the end of an index block split being done by another transaction the session would wait on event enq: TX - index contention. This leads to contention. In RAC environment, the contention on index is depicted as “gc buffer busy acquire” & “gc buffer busy release” wait events. When high number of concurrent inserts lead to excessive index block splits, it hurts the performance. To avoid contention (hot spot), distribute the index keys randomly across many database blocks: indexes can be Global Hash partitioned. The following table lists the indexes from SOA tables that are likely to suffer from the index contention under heavy load. This table can be used as starting point for tuning. 95
  • 96. Table 37: Tables under potential of index contention Index COMPOSITE_INSTANCE_CREATED BRDECISIONINSTANCE_INDX3 REFERENCE_INSTANCE_CO_ID DOC_DLV_MSG_GUID_INDEX CUBE_SCOPE Primary Key INDEX XML_DOCUMENT Primary Key INDEX CI_ECID AC_PK CI_CREATION_DATE TABLE AUDIT_COUNTER WI_STRANDED DLV_MESSAGE_CIKEY DOC_DLV_MSG_GUID_INDEX HEADERS_PROPERTIES_PK DLV_MESSAGE_PK DLV_MESSAGE_DATE_ECID DOC_DLV_MSG_ID_INDEX DLV_MESSAGE Primary Key Index DM_CONVERSATION CONV_ID_STATE_DLV_TYPE WI_STRANDED Partitioning Key GLOBAL PARTITION BY RANGE (CREATED_TIME) and then SUBPARTITION BY HASH(COMPOSITE_DN) GLOBAL PARTITION BY RANGE(CREATION_TIME) and then SUBPARTITION BY HASH(STATE) GLOBAL PARTITION BY HASH(PROTOCOL_CORRELATION_ID) GLOBAL PARTITION BY HASH(MESSAGE_GUID) GLOBAL PARTITION BY HASH(CIKEY) GLOBAL PARTITION BY HASH (DOCUMENT_ID) GLOBAL PARTITION BY HASH(ECID) GLOBAL PARTITION BY HASH(CIKEY) GLOBAL PARTITION BY RANGECREATION_DATE) PARTITION BY HASH(CIKEY) GLOBAL PARTITION BY RANGE(MODIFY_DATE) GLOBAL PARTITION BY HASH(CIKEY) GLOBAL PARTITION BY HASH(MESSAGE_GUID) GLOBAL PARTITION BY HASH(MESSAGE_GUID) GLOBAL PARTITION BY HASH(MESSAGE_GUID) GLOBAL PARTITION BY RANGE(RECEIVE_DATE) and then SUBPARTITION by HASH(ECID) GLOBAL PARTITION BY HASH(DOCUMENT_ID ) GLOBAL PARTITION BY HASH (MESSAGE_GUID) GLOBAL PARTITION BY HASH(CONV_ID) GLOBAL PARTITION BY HASH(CONV_ID) GLOBAL PARTITION BY RANGE (MODIFY_DATE) 10.3.1.4 enq: SQ – contention Sequence may face contention during heavy load. Tune cache value of following sequences: • • SEQ_ULGYF_QHGPHCDX_ZBG5ARQ__ SEQ_Kz5RKYJvLhWspE3N_p13ew__ To start with keep cache value at 2000. 10.4 SecureFiles One can also opt for SecureFiles feature for SOAINFRA schema. SecureFiles feature is available in Oracle Database 11g R1 and higher versions. SecureFiles feature brings in following benefits to SOAINFRA schema. • Reduced fragmentation because of usage of CHUNKS (one or more Oracle blocks) size settings to maximize contiguous memory allocation on the disk. • Optimized space management for unstructured data (blob, clob, raw) • Usage of Write-Gather cache (WGC) to facilitate increased buffer sixe (up to 4MB) • No LOB Index contention due to non-usage of LOB index to manage the inodes. • No High water mark contention (“enq:HW – contention” wait events in AWR report) due to background space reclamation process. • De-duplication can be implemented to weed out duplicate storage of document payload 96
  • 97. • • Choice of three levels of compression (LOW, MEDIUM, and HIGH) to tune performance and space utilization). Column level encryption instead of table level 10.4.1 Enable SecureFiles for SOAINFRA schema Automatic Segment Space Management (ASSM) of tablespace is prerequisite for SecureFiles segments. Good news is that SOAINFRA schema is by default ASSM enabled. To find out which space manage scheme is in use, following query will suffice: Select segment_space_management from dba_tablespaces where tablespace_name like '%SOAINFRA%'; The db_securefile system parameter controls the SecureFiles usage policy. The following options can be used for using SecureFiles: • PERMITTED: allows SecureFiles to be created (This is the default setting for db_securefile. The default storage method uses BasicFiles) • FORCE: create all (new) LOBs as SecureFiles • ALWAYS: try to create LOBs as SecureFiles, but fall back to BasicFiles if not possible (if ASSM is disabled) 10.4.1.1 SecureFiles for new SOAINFRA schema One can set up table space segments to SecureFiles at the time of creation. a) b) c) d) Set ASSM for table space of SOAINFRA schema. Set db_securefile parameter to ALWAYS or FORCE. Execute Repository Creation utility (RCU). Execute following script to set compression to LOW, enabling DEDUPLICATION. spool on; spool /tmp/reportLOBs.log; set lin 300; SET SERVEROUTPUT ON SIZE 100000 BEGIN FOR t IN (select table_name, column_name, securefile, owner from dba_lobs where securefile='YES' and owner like 'SOAINFRA') LOOP EXECUTE IMMEDIATE 'alter table ' || t.owner || '.' || t.table_name || ' modify lob(' || t.column_name|| ') (deduplicate)'; EXECUTE IMMEDIATE 'alter table ' || t.owner || '.' || t.table_name || ' modify lob(' || t.column_name|| ') (compress LOW)'; END LOOP; END; / colum column_name format a25; colum table_name format a25; 97
  • 98. select table_name, column_name, securefile, retention, encrypt, compression, deduplication from dba_lobs where securefile='YES' and owner like ‘SOAINFRA'; spool off; / Snippet 13: SecureFiles e) Verify that changes have taken place by verifying /tmp/reportLOBs.log file for each LOB. Since by default ENCRYPTION is not set, so no special effort is required. 10.4.1.2 SecureFiles for existing SOAINFRA schema One may use Online Redefinition to migrate BasicFiles to SecureFiles for an existing SOAINFRA schema. Online Redefinition allows the tables or partitions to remain online and can be done in parallel. The drawback of using online redefinition are: • additional storage equal to the entire table or partition and all its LOB segments must be available • global indexes must be rebuilt The redefinition can be done at the table or partition level. The example script migrates CUBE_SCOPE table using Online Redefinition from BasicFiles to SecureFiles (only SCOPE_BIN column is migrated). ---Create Interim Table --Constraints are copied by the redefinition CREATE TABLE SOAINFRA.CUBE_SCOPE_RD ("CIKEY" NUMBER(*,0), "BINARY_FORMAT" NUMBER(*,0), "MODIFY_DATE" TIMESTAMP (6), "SCOPE_BIN" BLOB, "CI_PARTITION_DATE" TIMESTAMP (6) ) SEGMENT CREATION DEFERRED PCTFREE 20 PCTUSED 1 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING STORAGE( FREELISTS 6) LOB ("SCOPE_BIN") STORE AS SECUREFILE ( TABLESPACE "SOAINFRA" ENABLE STORAGE IN ROW CHUNK 8192 CACHE NOCOMPRESS KEEP_DUPLICATES STORAGE( INITIAL 16384 NEXT 16384)) PARTITION BY RANGE (CI_PARTITION_DATE) (PARTITION part1 VALUES LESS THAN (TO_date('<<dd-mon-yyy hh24:mi>>', 'dd-monyyyy hh24:mi')) , PARTITION part2 VALUES LESS THAN (TO_date('<<dd-mon-yyy hh24:mi>>', 'dd-monyyyy hh24:mi')), PARTITION part3 VALUES LESS THAN (TO_date('<<dd-mon-yyy hh24:mi>>', 'dd-monyyyy hh24:mi')) ) TABLESPACE "SOAINFRA"; --Perform Redefinition --Define Column Mappings DECLARE col_mapping VARCHAR2(1000); BEGIN 98
  • 99. col_mapping := 'CIKEY CIKEY , ' || 'BINARY_FORMAT BINARY_FORMAT , ' || 'MODIFY_DATE MODIFY_DATE, ' || 'SCOPE_BIN SCOPE_BIN, ' || 'CI_PARTITION_DATE CI_PARTITION_DATE'; --Start redef. DBMS_REDEFINITION.START_REDEF_TABLE (uname => 'SOAINFRA',orig_table => 'CUBE_SCOPE',int_table => 'CUBE_SCOPE_RD',col_mapping =>col_mapping); END; / --Redefine copying constraints etc DECLARE error_count pls_integer := 0; BEGIN DBMS_REDEFINITION.COPY_TABLE_DEPENDENTS('SOAINFRA', 'CUBE_SCOPE', 'CUBE_SCOPE_RD', 1, TRUE,TRUE,TRUE,FALSE, error_count); DBMS_OUTPUT.PUT_LINE('errors := ' || TO_CHAR(error_count)); END; / EXEC DBMS_REDEFINITION.FINISH_REDEF_TABLE('SOAINFRA', 'CUBE_SCOPE', 'CUBE_SCOPE_RD'); --Drop the interim table DROP TABLE SOAINFRA.CUBE_SCOPE_RD; Snippet 14: BasicFiles to SecureFiles In case of partial partitioning of the SOAINFRA schema (partitioning to specific tables with a high growth rate) specific rules apply. In order to partition a dependent table, its master table must be partitioned as well. (Refer to the Oracle® Fusion Middleware Administrator's Guide for Oracle SOA Suite and Oracle Business Process Management Suite for a list of dependencies and range keys). COMPOSITE_INSTANCE table always needs to be partitioned when the Audit Level property is set to Development or Production for any of the composites. This implies that the example above (CUBE_SCOPE table) requires also the appropriate redefinition of the COMPOSITE INSTANCE table and the CUBE_INSTANCE table (which is the CUBE_SCOPE’s master) with the exact same ranges. The scripts bellow provide the required table partitions for these tables (to match the script above) without using online redefinition statements for simplicity: CREATE TABLE "PROD_SOAINFRA"."COMPOSITE_INSTANCE" ( "ECID" VARCHAR2(100), "ID" NUMBER(*,0), "PARENT_ID" VARCHAR2(100), "CONVERSATION_ID" VARCHAR2(100), "COMPOSITE_DN" VARCHAR2(500), "SOURCE_NAME" VARCHAR2(100), "SOURCE_TYPE" VARCHAR2(200), "SOURCE_ACTION_TYPE" VARCHAR2(10), "SOURCE_ACTION_NAME" VARCHAR2(500), "BATCH_ID" VARCHAR2(100), "BATCH_INDEX" NUMBER(*,0), "BUSINESS_STATUS" NVARCHAR2(100), "INDEX1" VARCHAR2(100), "INDEX2" VARCHAR2(100), "INDEX3" VARCHAR2(100), "INDEX4" VARCHAR2(100), "INDEX5" VARCHAR2(100), "INDEX6" VARCHAR2(100), "TITLE" NVARCHAR2(100), "TAGS" VARCHAR2(2000), 99
  • 100. "TEST_RUN_NAME" VARCHAR2(100), "TEST_RUN_ID" VARCHAR2(100), "TEST_SUITE" VARCHAR2(100), "TEST_CASE" VARCHAR2(100), "STATE" NUMBER(3,0), "LIVE_INSTANCES" NUMBER(3,0), "STATE_COUNT" NUMBER, "HAS_ASSOC" CHAR(1), "VERSION" NUMBER(*,0), "PARTITION_DATE" TIMESTAMP (6) DEFAULT systimestamp, "TENANT_ID" NUMBER(18,0) DEFAULT -1, "CREATED_BY" VARCHAR2(100), "CREATED_TIME" TIMESTAMP (6) NOT NULL ENABLE, "UPDATED_BY" VARCHAR2(100), "UPDATED_TIME" TIMESTAMP (6) ) SEGMENT CREATION DEFERRED PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING PARTITION BY RANGE (CREATED_TIME) (PARTITION part1 VALUES LESS THAN (TO_date('25-Jul-2012 00:30', 'dd-mon-yyyy hh24:mi')), PARTITION part2 VALUES LESS THAN (TO_date('25-Aug-2012 00:30', 'dd-mon-yyyy hh24:mi')), PARTITION part3 VALUES LESS THAN (TO_date('25-Sep-2012 00:30', 'dd-mon-yyyy hh24:mi')) ) TABLESPACE "SOAINFRA"; CREATE TABLE "PROD_SOAINFRA"."CUBE_INSTANCE" ( "CIKEY" NUMBER(*,0) NOT NULL ENABLE, "CREATION_DATE" TIMESTAMP (6) NOT NULL ENABLE, "CREATOR" VARCHAR2(100), "MODIFY_DATE" TIMESTAMP (6), "MODIFIER" VARCHAR2(100), "STATE" NUMBER(*,0), "PRIORITY" NUMBER(*,0), "TITLE" NVARCHAR2(200), "STATUS" NVARCHAR2(100), "STAGE" VARCHAR2(100), "CONVERSATION_ID" VARCHAR2(256), "ROOT_ID" VARCHAR2(100), "PARENT_ID" VARCHAR2(100), "SCOPE_REVISION" NUMBER(*,0), "SCOPE_CSIZE" NUMBER(*,0), "SCOPE_USIZE" NUMBER(*,0), "PROCESS_TYPE" NUMBER(*,0), "METADATA" NVARCHAR2(1000), "EXT_STRING1" VARCHAR2(100), "EXT_STRING2" VARCHAR2(100), "EXT_INT1" NUMBER(*,0), "TEST_RUN_ID" VARCHAR2(100), "TEST_RUN_NAME" VARCHAR2(100), "TEST_CASE" VARCHAR2(100), "TEST_SUITE" VARCHAR2(100), "ECID" VARCHAR2(100), "CMPST_ID" VARCHAR2(100), "OUTCOME" VARCHAR2(100), "TRACKING_LEVEL" VARCHAR2(16), 100
  • 101. "AT_COUNT_ID" NUMBER(*,0), "AT_EVENT_ID" NUMBER(*,0), "AT_DETAIL_ID" NUMBER(*,0), "VERSION" NUMBER(*,0), "AG_ROOT_ID" VARCHAR2(100), "AG_MILESTONE_PATH" VARCHAR2(100), "CACHE_VERSION" NUMBER(*,0), "PARENT_REF_ID" VARCHAR2(150), "COMPONENTTYPE" VARCHAR2(10) NOT NULL ENABLE, "NOTM" NUMBER(*,0), "COMPOSITE_NAME" VARCHAR2(500) NOT NULL ENABLE, "DOMAIN_NAME" VARCHAR2(50), "COMPONENT_NAME" VARCHAR2(300) NOT NULL ENABLE, "COMPOSITE_LABEL" VARCHAR2(50), "COMPOSITE_REVISION" VARCHAR2(50) NOT NULL ENABLE, "CREATE_CLUSTER_NODE_ID" VARCHAR2(100), "LAST_CLUSTER_NODE_ID" VARCHAR2(100), "CPST_INST_CREATED_TIME" TIMESTAMP (6) DEFAULT systimestamp, "TENANT_ID" NUMBER(18,0) DEFAULT -1, CONSTRAINT "CI_PK" PRIMARY KEY ("CIKEY") USING INDEX REVERSE PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS TABLESPACE "PROD_SOAINFRA" ENABLE ) SEGMENT CREATION DEFERRED PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING STORAGE( FREELISTS 20) PARTITION BY RANGE (CPST_INST_CREATED_TIME) (PARTITION part1 VALUES LESS THAN (TO_date('<<dd-mon—yyyy hh24:mi>>', 'ddmon-yyyy hh24:mi')), PARTITION part2 VALUES LESS THAN (TO_date('<<dd-mon—yyyy hh24:mi>>', 'dd-monyyyy hh24:mi')), PARTITION part3 VALUES LESS THAN (TO_date('<<dd-mon—yyyy hh24:mi>>', 'dd-monyyyy hh24:mi')) ) TABLESPACE "SOAINFRA"; Enable SecureFiles for all tables which has LOB. 10.4.2 Enabling Encryption To tune SOAINFRA, in case of encryption requirement one can leverage column specific encryption facility. In other words one can take benefit of column specific encryption facility to do encryption for specific columns in selected tables. SecureFiles LOBs are encrypted using the Transparent Data Encryptions (TDE). If TDE is in use then applications do not need to manage the encryption and decryption of data, it is handled by the database. The encryption keys are stored in a location (wallet) external to the database. This location defaults to $ORACLE_BASE/admin/$ORACLE_SID or can be specified in sqlnet.ora file using parameter WALLET_LOCATION. Steps to enable encryption for specific SecureFiles LOBs are: a. Set ORACLE_BASE variable to point to the appropriate directory: For example: $> export ORACLE_BASE=/u01/app/orcl 101
  • 102. b. Create the wallet directory(otherwise encryption enabling commands will fail with ORA28368: cannot auto-create wallet error): $ >mkdir $ORACLE_BASE/$ORACLE_SID/wallet c. Start SQL Plus as sysdba (or user with ALTER SYSTEM privileges) and create an encrypted wallet by using the “ALTER SYSTEM set encryption” command: SQL> ALTER SYSTEM SET ENCRYPTION KEY IDENTIFIED BY “<<myPassword>>”; d. Before performing any encryption or decryption operation it is required to make sure that the Oracle wallet is open. Use the following command to open the wallet containing the master encryption key: SQL> ALTER SYSTEM SET ENCRYPTION WALLET OPEN IDENTIFIED BY "<<myPassword>>"; e. Use the alter table modify lob (lob)(encrypt) statement to encrypt the specific SecureFiles LOB. For example: SQL> ALTER TABLE PROD_SOAINFRA.CUBE_SCOPE modify lob(SCOPE_BIN) (ENCRYPT); One can choose from one of the following algorithms: • AES128 • AES192 (default) • AES256 • 3DES168 To enable a different algorithm from default use “ENCRYPT USING ALGORITHM_NAME” instead of just “ENCRYPT” The encryption statement will error out if the DATA TYPE used by the column is of type “ANYDATA” (and there are a few columns using it in the SOAINFRA schema). It will also fail if the COLUMN is already encrypted. To encrypt all SOAINFRA LOBS using the default algorithm, the following script can be used: spool on; spool /tmp/reportEncyprtion.log; SET SERVEROUTPUT ON SIZE 100000 DECLARE DT VARCHAR(30); BEGIN FOR t IN (select table_name, column_name, securefile, owner from dba_lobs where securefile='YES' and owner like ‘PROD_SOAINFRA%') LOOP BEGIN select distinct tD.data_type into DT from all_tab_columns tD where tD.TABLE_NAME = t.table_name and tD.COLUMN_NAME=t.column_name; 102
  • 103. dbms_output.put_line('Datatype: '); dbms_output.put_line(DT); IF ( DT not like 'ANYDATA') THEN dbms_output.put_line(DT); EXECUTE IMMEDIATE 'alter table ' || t.owner || '.' || t.table_name || ' modify lob(' || t.column_name|| ') (ENCRYPT)'; END IF; EXCEPTION when others THEN dbms_output.put_line('Error performing encryption ... '); END; END LOOP; END; / colum column_name format a25; colum table_name format a25; select table_name, column_name, securefile, retention, encrypt, compression, deduplication from dba_lobs where securefile='YES' and owner like ‘PROD_SOAINFRA%'; spool off; / After the script completes, check the /tmp/reportEncyprtion.log file to verify that the pertaining LOBs have been encrypted 10.5 SQL Plan Due to sudden change in SQL plan, sometime well performing query becomes slow and becomes bottle neck in performance. This sudden change in SQL plan occurs due to: • • stale statistics changes in data volume • bind peeking To overcome this issue, recollect statics which will help database to choose appropriate SQL plan. 11 Reference 1. Oracle® Fusion Middleware Performance and Tuning Guide 11g Release 2 (11.1.2): http://docs.oracle.com/cd/E27559_01/doc.1112/e28552/toc.htm 2. Oracle® Fusion Middleware Administrator's Guide for Oracle SOA Suite and Oracle Business Process Management Suite 11g Release 1 (11.1.1.6.3): http://docs.oracle.com/cd/E23943_01/admin.1111/e10226/toc.htm 3. Oracle® Fusion Middleware Administrator's Guide 11g Release 1 (11.1.1): http://docs.oracle.com/cd/E28280_01/core.1111/e10105/toc.htm 103
  • 104. 4. Tuning and Performance for Oracle SOA Suite 11g on Oracle’s SPARC T4 Servers: http://www.oracle.com/technetwork/server-storage/hardware-solutions/o12-045-soat4-tuning-1661118.pdf 5. Enable Discovery Cache to Avoid Long Delay during Login to EM console – Oracle SOA 11g: http://www.albinsblog.com/2012_06_01_archive.html#.Uae_eDC1GSo 6. Oracle® Fusion Middleware User's Guide for Technology Adapters 11g Release 1 (11.1.1.6.3): http://docs.oracle.com/cd/E23943_01/integration.1111/e10231/toc.htm 7. Oracle SOA Suite 11g Performance Tuning – Webinar Series by C2B2: https://blogs.oracle.com/soacommunity/entry/oracle_soa_suite_11g_performance 8. Performance Tuning Oracle SOA Suite 11g - Top 11 Tuning Tips: https://mix.oracle.com/events/oow11/proposals/11003-performance-tuning-oraclesoa-suite-11g-top-11-tuning-tips 9. SOA 11g Database Performance: http://www.oracle.com/technetwork/middleware/soasuite/learnmore/psrsoadbperfor mance-1919499.pdf 10. BPEL PM API: http://docs.oracle.com/cd/E14571_01/apirefs.1111/e10659/index.html?overviewtree.html 11. SOA 11G Database Growth Management Strategy: http://www.oracle.com/technetwork/middleware/bpm/learnmore/soa11gstrategy1508335.pdf 12. SOA Best Practices: The BPEL Cookbook: http://www.oracle.com/technetwork/articles/soa/index-095969.html 13. Oracle SOA Suite 11g Performance Tuning – Webinar Series by C2B2: https://blogs.oracle.com/soacommunity/entry/oracle_soa_suite_11g_performance 14. Partition (database): http://en.wikipedia.org/wiki/Partition_(database) 15. Oracle® Fusion Middleware Administrator's Guide: http://docs.oracle.com/cd/E28271_01/core.1111/e10105/repos.htm 16. Oracle Fusion Middleware Enterprise Deployment Guide for Oracle SOA Suite http://docs.oracle.com/cd/E23943_01/core.1111/e12036/toc.htm 17. Oracle® Fusion Middleware Administrator's Guide for Oracle SOA Suite and Oracle Business Process Management Suite: http://docs.oracle.com/cd/E23943_01/admin.1111/e10226/toc.htm 18. Oracle® Fusion Middleware Developer's Guide for Oracle SOA Suite 11g Release 1 (11.1.1.6): http://docs.oracle.com/cd/E23943_01/dev.1111/e10224/fod_hi_level_fod.htm#CIHGDI II 19. Oracle® Database SecureFiles and Large Objects Developer's Guide 11g Release 2 (11.2): http://docs.oracle.com/cd/E11882_01/appdev.112/e18294/toc.htm 20. Oracle® Real Application Clusters Administration and Deployment Guide: http://download.oracle.com/docs/cd/B28359_01/rac.111/b28254/toc.htm 21. Oracle® Database Advanced Security Administrator's Guide: http://docs.oracle.com/cd/B28359_01/network.111/b28530/toc.htm 22. Oracle FMW SOA 11g R1: Using Secure Files: http://www.oracle.com/technetwork/database/availability/oraclefmw-soa-11gr1securefiles-1842740.pdf 104