Beruflich Dokumente
Kultur Dokumente
4773
passcode: bpel
Press *1 at end to ask verbal questions
During conf, use chat feature to ask questions
Agenda
• Agenda
• Benchmarks
• Concepts
• Architecture
• Design
• Tuning
• Tools
• Case Study
1
Agenda
• Agenda
• Benchmarks
• Concepts
• Architecture
• Design
• Tuning
• Tools
• Case Study
Benchmarks
185 req/sec BankTransferFlow •Sync. transient 2 CPU
•Small request size Linux
•Dehydration OFF
6 million DB Internal Retek •Simple batching process 4 CPU
rows/hr Integration •DB adapter in/outbound Solaries
3.2Million req/day Based on •Async. Durable 4 CPU
(2KB payload) European Space •5-10 steps Linux
1.92 Million req/day Agency use case •SOAP call-out
(25KB payload) •Dehydration ON
19K txn/minute Based on a U.S. •Sync. Transient 2x 2CPU
Gov. Agency use •Small request size (1K) Linux
case •JMS->BPEL->EJB->DB
•Dehydration OFF
2
Agenda
• Agenda
• Benchmarks
• Concepts
• Architecture
• Design
• Tuning
• Tools
• Case Study
Concepts
3
Concepts
Throughput or
response Time
Throughput
Response time
Concepts
4
Common Bottlenecks
• Response time
• Too much dehydration store activities
• Large payload (> 100K)
• Too many layers
• Concurrency:
• Too few BPEL engine threads
• Too few Adapter threads (adapter not moving messages to
BPEL engine fast enough)
• Others:
• Not enough connections to dehydration store database
• JVM under utilize OS memory
• Dehydration store database is slow
Agenda
• Agenda
• Benchmarks
• Concepts
• Architecture
• Design
• Tuning
• Tools
• Case Study
5
BPEL Performance Architecture
BPEL-Optimized
Write-through
SOAP Stack
Cache
BPEL Server
App. Server
LOAD BALANCER
Binary DOM
• Lazy Loading
• Smart Partitioning
BPEL Server
• W3C DOM Interface
• Support for Large Documents
App. Server
Dehydration Store
(Oracle Database)
Process Types
• By interface
• Asynchronous: one-way invocation
• Synchronous: two-way invocation
• By durability
• Durable process: long running
• Has mid process breakpoint activities (Receive, onMessage,
onAlarm, Wait)
• Or, Has non-idempotent invoke
• Or, Has non-blocking invoke
• Transient process: short lived
• No mid process breakpoint activities (Receive, onMessage,
onAlarm, Wait)
• And, No non-idempotent invoke
• And, No non-blocking invoke
6
Process Types
Durable Transient
Sync.
•Two way invocation
Process Types
Durable Transient
7
Process Types
• Breakpoint activities
• Receive
• onMessage
• onAlarm
• Wait
• Idempotent invoke
• idempotent = retry-able
• BPEL engine dehydrates after non-idempotent activities
• E.g. Assign is idempotent
• Invoke is idempotent by default, can be set non-idempotent
• Non-blocking invoke
• Means Engine perform invoke within FlowN in parallel
• Default to be “blocking”, can be set non-blocking
Async. Durable
(Example: LoanFlow) • Caller thread to
receive message
Container • Separate threads to
BPEL Engine create/run instance
Connection
• Persist all messages
Pool
• Dehydrates “in flight”
T1 T2
1 at breakpoints (multi
Client txn)
Worker
Beans
T2, C1 Dehydration
2
T3 T4 Store
Partner 3 T4, C2
queue
8
Sync. Transient
(Example: CreditRatingService) • Caller thread to
receive message
Container BPEL Engine and create/run
Connection
instance
Pool • Not persist message
T1 T1 • Dehydrates once at
Client the end (one txn)
T1, C1 Dehydration
Store
9
Threads and Dehydration
• Durable processes
• Mandatory to save states
• Save state “in flight” at breakpoints
• Transient processes
• Optional to save state
• Save state at the end
Agenda
• Agenda
• Performance Benchmarks
• Performance Concepts
• BPEL Performance Architecture
• Process Design Tips
• Tuning
• Tools
• Case Study
10
Process Design Tips
• Make async. transient -> sync. transient
• Sync process does not persist incoming messages
• Throw exception to client on error
• Combine many small processes into bigger ones
• Optimize transformation
• Use Oracle XDK •Change to : xdk:processXSLT()
<copy>
<from expression=“ora:processXSLT('transform_1.xsl‘,
bpws:getVariableData('input',‘payload'))"/>
<to variable=“input2" part=“payload"/>
</copy>
• Use J2EE data source in DB lookup
11
Agenda
• Agenda
• Benchmarks
• Concepts
• Architecture
• Design
• Tuning
• Tools
• Case Study
Tuning
12
Tuning Knobs
• By process types
• For durable processes
• For transient processes
• For both
• By levels
• Process level (bpel.xml)
• Domain level (BPEL Console)
• J2EE container level (Ex: j2ee/OC4J_BPEL/config)
• Database level (init.ora/spfile)
• By categories
• Dehydration store activities
• Concurrency
• Misc.
13
Process Level Dehydration
Knobs
CreditRatingService/bpel.xml
<BPELSuitcase>
<BPELProcess id="CreditRatingService“ src="CreditRatingService.bpel">
<partnerLinkBindings>
<partnerLinkBinding name="client">
<property name="wsdlLocation">CreditRating.wsdl</property>
</partnerLinkBinding>
</partnerLinkBindings>
<configurations>
<property name="inMemoryOptimization">true</property>
<property name="completionPersistPolicy">faulted</property>
<property name="completionPersistLevel">all</property>
</configurations>
</BPELProcess>
</BPELSuitcase>
Concurrency Knobs
Durable Transient
Process N/A Process N/A
Domain •dspMaxThread Domain •dspMaxThread
Async
Process N/A
Domain •dspMaxThread Process N/A
Container •Worker Bean threads Domain N/A
Sync
14
Concurrency Knobs
•dspMaxThreads (domain) •Max DS connections •Max DB processes
•Worker Bean Threads (container)
Container BPEL Engine
Connection
Pool
T1 T2
Client
Worker
Beans
T2, C1 Dehydration
T3 T4 Store
Partner T4, C2
queue
Concurrency Knobs
15
Concurrency Knobs
Concurrency Knobs
16
Other Knobs
• idempotent (durable, process level)
• idempotent = retry-able
• Engine dehydrates after non-idempotent activities
Other Knobs
• nonBlockingInvoke (durable, process level)
• Perform parallel invoke within FlowN
true Engine will spawn a new thread to execute each invoke (parallel)
false (default) Engine will execute the invoke activity in the process thread (sequential)
17
Other Knobs
Process •idempotent
•nonBlockingInvoke
Process •completionPersistPolicy
Domain •dspMaxThread
•completionPersistLevel
Sync
•auditLevel
Domain •auditLevel
Container •Worker Bean threads
Container Datasource max con
•Invoker Bean threads
•Datasource max con
18
To be deprecated in 10.1.3
• deliveryPersistPolicy
• optCacheOn
• instCachePolicy
• instCacheHighWatermark
• instCacheLowWatermark
Tuning Adapters
Example: JMS
Container BPEL Engine adapter instantiate
EIS
Connection a BPEL process
Pool once it detects a
T1 T1 T2 new message at
Adapter
Client JMS queue
Worker
Beans
T2, C1 Dehydration
T3 T4 Store
Partner T4, C2
queue
19
Tuning Adapters
20
Tuning Database Adapters
21
Tuning Database Adapters
<binding name="insertService_binding" type="tns:insertService_ptt">
<jca:binding />
<operation name="write">
<jca:operation
InteractionSpec="oracle.tip.adapter.db.DBWriteInteractionSpec“
DescriptorName="insertService.SenderDept“
DmlType=“insert“
MappingsMetaDataURL="insertService_toplink_mappings.xml" />
<input>
<jca:header message="hdr:OutboundHeader_msg" part="outboundHeader"/>
</input>
</operation>
</binding>
• *** Some parameters can be set with the DBAdapter wizard ***
• FileAdapter/FtpAdapter
• De-batch inbound file into multiple messages (Wizard)
• Increase concurrency
• Decrease the use of While loop
22
Tuning JVM
• Max. heap size: Set to max. addressable OS memory size
• 32 bit Linux: 4G
• 32 bit Windows: 2G
• E.g. –Xmx 2048m
• Min. heap size: Set to the same as max heap size
• E.g. –Xms 2048m
• Eden space: Set to 60% of max heap
• Dictates JVM garbage collection behaviors
• E.g: -Xmn1228m
• Aggressive heap: for multiple CPU non-Windows machines
• E.g. -XX:+AggressiveHeap
java … -Xms2048m -Xmx2048m -Xmn1228m -XX:+AggressiveHeap …
Tuning JVM
• Developer edition:
HOME/integration/orabpel/bin/startorabpel.bat
• Mid-tier installation:
IAS_HOME/opmn/conf/opmn.xml
23
Tuning Database
Parameters Recommendation
log_buffer 1048576
shared_pool_size 400M
job_queue_processes 1
db_cache_size 1000M
db_file_multiblock_read_count 8
undo_retention 0
processes 300
session_cached_cursors 100
BPEL Clustering
BPEL-Optimized
Write-through
SOAP Stack
Cache
BPEL Server
App. Server
LOAD BALANCER
Binary DOM
• Lazy Loading
• Smart Partitioning
BPEL Server
• W3C DOM Interface
• Support for Large Documents
App. Server
Dehydration Store
(Oracle Database)
24
Clustering with Adapters
Agenda
• Agenda
• Benchmarks
• Concepts
• Architecture
• Design
• Tuning
• Tools
• Case Study
25
Performance Tools
• BPEL Console
Tools Usage
Configuration Page Set domain level knobs
Performance Tools
26
Demo
Agenda
• Agenda
• Benchmarks
• Concepts
• Architecture
• Design
• Tuning
• Tools
• Case Study
27
The Scenario
JMS WSIF
Adapter Binding
Tuning
Modification Throughput Improve
(txn/min)
Process •Change async. to sync. (WSDL) ~1,800 ---------
•Set completionPersistPolicy=faulted (bpel.xml)
Adapter Use OCI driver 2,500 35%
(j2ee/OC4J_BPEL/config/application.xml)
Adapter Create multiple (8) adapter agents (bpel.xml) 10,000 400%
Cluster •Stripe the one inbound queue into two 19,000 95%
•Create a 2-node queue cluster (virtually
•Create a 2-node BPEL cluster unlimited
•Crisscrossing adapter agents to queues scalability)
28
Conclusions
29
Press *1 to ask verbal questions
Or continue to use chat feature to ask questions
Extra Slides
30
Case Study: Other Tunings
31
Case Study: Hardware View
BPEL
1
BPEL
EJB
app_host ZMSG1
BPEL
1
BPEL
ZMSG21
EJB
Case Study:
iAS 1
Software
Provider 1
View
WSIF
Provider 2
Binding
BPEL1
Queue 1 Order DB
iAS 2
Provider 1
Queue 2
WSIF
Provider 2
Binding EJB
BPEL2
32
Extra: Async. Transient Threads
• Caller thread to
receive message
Container BPEL Engine • Separate threads to
Connection create/run BPEL
Pool instance
T1 T2 • Save messages for
Client 1 Receives
Worker
queue Beans
2 Dehydration
T2, C1 Store
3
T1, C1 Dehydration
T2 T3 Store
Partner T3, C2
queue Worker
Beans
33
Extra: Async. Durable
Dehydration
• Save messages for
Container Receives
BPEL Engine
• Save process states
Connection
“in flight” at
Pool
breakpoints (multiple
T1 T2 txn)
Client 1
Worker
Beans
T2, C1 Dehydration
2
T3 T4 Store
Partner 3 T4, C2
queue
Worker
queue Beans
Dehydration
T2, C1 Store
34
Extra: Sync. Durable
Dehydration • Not save messages
for initial Receive
Container BPEL Engine • Save messages for
Connection mid process Receive
Pool • Save process states
T1 T1 “in flight” at
Client breakpoints (multiple
transactions)
T1, C1 Dehydration
1
T2 T3 Store
Partner 2 T3, C2
queue Worker
Beans
T1, C1 Dehydration
Store
35
Extra: Dehydration Store
Async
Durable
Knobs Transient
Domain •auditLevel
Container N/A Domain •auditLevel
Container N/A
36