How can we predict memory usage for operations? (To avoid OOM)

cancel
Showing results for 
Search instead for 
Did you mean: 
gspoffordalfres
Member II

How can we predict memory usage for operations? (To avoid OOM)

I hope this question is not hopelessly naive for the Alfresco community. Using Activiti community version 6.0, it's been easy for test processes that we've created to OOM our service when creating certain processes. A 29,000-way ParallelMultiInstance subprocess consisting of 1 user task with 3 timer events and service tasks does not fit within a JVM heap of 4GB. Doing a bit of profiling and examining an OOM heap dump, it seems that there are several objects created per task, for example HistoricVariableInstanceEntityImpl objects associated with each iteration of the ParallelMultiInstanceBehavior loops. Some of this is exacerbated by Activiti picking up the Spring Boot's Tomcat's JUEL interpreter instead of the de.odysseus JUEL, as the former seems to hold memory much more aggressively than the latter. 

By reputation, we'd expect that there is a decent number of Activiti users running largish ParallelMultiInstance processes, and running in a Tomcat container, but I haven't found any information on how to size memory based on process instance characteristics. Googling for Activiti OutOfMemoryError or OOM doesn't yield much today. Is there any guide available, or do any readers of this question have insights that they can share?

1 Reply
pault
Active Member II

Re: How can we predict memory usage for operations? (To avoid OOM)

I'd also be intestested in any sizing guidance out there as I'm working on an application which will potentially need to scale to very hign levels of usage. I'm anticipating performance profiling it myself to determine exact sizing requirements, but any information to use as a starting point would be useful. 

I did come across these links, which are more about performance and database sizings, and for an older version, but it does have some useful pointers as to potential bottlenecks - which may also be reflected in memory usage. One area mentioned that I know myself can have a big impact is history. If you don't need that it might be worth trying turning it off to see what impact that has.

Activiti Database Scalability 

The Activiti Performance Showdown | Small steps with big feet