Bug 743171 - Optimized 'ProcessInstancesWaitingForEvent' query for improved performance
Summary: Optimized 'ProcessInstancesWaitingForEvent' query for improved performance
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise BRMS Platform 5
Classification: JBoss
Component: jBPM 5
Version: BRMS 5.3.0.GA
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Kris Verlaenen
QA Contact: Lukáš Petrovický
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-10-04 03:35 UTC by Jeffrey Bride
Modified: 2012-05-03 00:56 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-11-08 14:26:04 UTC
Type: ---


Attachments (Terms of Use)

Description Jeffrey Bride 2011-10-04 03:35:30 UTC
performance tests on processes that are defined with sub-processes reveals that the existing 'ProcessInstancesWaitingForEvent' named query quickly becomes a performance bottleneck.

Specifically, performance tests have been conducted on jbpm5 (git hub commit #:  129b5b2d2f1e8173f16be6a8df8a2d06daf4b22d ) running on RHEL 5.5 with two CPUs with latest PostgreSQL available for that OS (PostgreSQL 8.4).  Performance tests revealed that postgresql processes quickly pegged CPU utilization at 90-95%.

As an alternative, the following modification to the 'ProcessInstancesWaitingForEvent' named query completely stabilized our test results by bringing PostgreSQL CPU utilization back down to 15-25% :



<named-query name="ProcessInstancesWaitingForEvent">
        <query>
  select
        processInstanceInfo.processInstanceId
  from
        ProcessInstanceInfo processInstanceInfo join    processInstanceInfo.eventTypes eventTypes
where
        eventTypes=:type
        </query>
</named-query>

Comment 1 Jeffrey Bride 2011-11-08 14:26:04 UTC
Fixed on Oct 6 in jbpm-persistence-jpa/src/main/resources/META-INF/orm.xml


Note You need to log in before you can comment on or make changes to this bug.