cancel
Showing results for 
Search instead for 
Did you mean: 

Re: History performance (and the usefulness of level 'none')

sazzadul
Champ in-the-making
Champ in-the-making
Hi,

      I just wanted to share our experience with activiti which we have been running in our production environment for over an half year now with several hundred processes each day being processed and the performance is not an issue at all. Our processes are really very complex.

      We use history level activity and it caused us some trouble initially then we did a sql analysis of our database(oracle) and found the exact query which was most expensive and then added indexes on act_hi_actinst (ACT_ID_ and EXECUTION_ID_) and the problem just dissapeared.

SELECT *
  FROM (SELECT a.*, ROWNUM rnum
          FROM (SELECT *
                  FROM act_hi_actinst hai
                 WHERE hai.execution_id_ = :1
                   AND hai.act_id_ = :2
                   AND hai.end_time_ IS NULL) a
         WHERE ROWNUM < :3)
WHERE rnum >= :4

       Hope this would also help you in your way to evaluating activiti as process engine.

/Sazzadul
4 REPLIES 4

jbarrez
Star Contributor
Star Contributor
I'm the author of the article you reference there. Yes, history has an impact. The article proves that the overhead of the engine is really (really!) low. However, we can't remove any of the costs associated with the actual inserts and updates.

Currently, we're looking if we could handle the history asynchronously, which would solve the impact on performance. However, we're talking about release 5.12 at least here.

Also, you mention that you can do xx processes/minute. Does this mean you have only straight through processes? Most processes have wait states in between (eg user tasks). As such the life time of a process spans many hours, with only db operations every once in a while.

ronald_van_kuij
Champ on-the-rise
Champ on-the-rise
If these two indexes help a lot in basic situation, maybe they should be added to the default engine.

Thanks anyway for the feedback and postive remarks

frederikherema1
Star Contributor
Star Contributor
We've had a big wave of spam overflow the forum today. This cause a lot of manual batch work for me an I have accidentally deleted your account.

frederikheremans 172.31.10.237 Fri Nov 16, 2012 2:18 pm Deleted user
» eDam

I'm very sorry for this, not sure how I've managed to let this slip through my fingers. I can remember the post you're referring to and confirm that you said nothing wrong, so please repost your comment as every community-member's contributions is valued.

jbarrez
Star Contributor
Star Contributor
@jbarrez :
Did you impoved the history DB in your benchmark?
If not, It might be interesting to see the impact.

No, I used the vanilla Activiti. Indeed, a very interesting thing to try out!