Profile picture for user maikoliv

Hi,

I've got a question about the memory used by reports. While developing I run reports often multiple times in a row for example for chronometry, etc.

Yesterday we experienced trouble with the ARIS Server starting that very moment I ran a comparison of several functions' execution times. Finally found out server's memory was at maximum and the problem could be solved by restarting the ARIS server service.

So, is there a way to return memory allocated by a report and its objects?

I'm not much of a javascript-guru, but I guess there is no way to do in the code. But maybe there is a way to configure the ARIS report service, if any ...

Hope anyone has an idea. Thnks a lot.

Regards,

Maik

by Martin Schröder
Badge for 'Contributor' achievement
Posted on Fri, 03/25/2011 - 18:19

PLease see Aris Installation&AdminGuide.pdf in the docs folder of your installation for detailed procedure:

You can allocate more RAM at startup of the server in server\config\userServerSettings.cfg

But there is limits for the max per Java Virtual Machine, depending on your platform (Win or *ix, 32 or 64bit)

 

0
by Maik Scharlau Author
Posted on Thu, 03/31/2011 - 16:16

Hi,

 

thank you very much. It hleped indeed.

 

Kind regards,

Maik

0
by Fernando Navarro
Posted on Tue, 04/05/2011 - 21:07

Hello,

I've been monitoring my Aris Business Server and I've noticed that even if I increase de allocated memory for the java VM, still it is not released after running any report. In fact it just keeps on increasing after each report execution, so after a while (it could be weeks), it will eventually run out of memory again and I'll need to restart the server.

Any ideas?

Thanks in advance

 

0
by Maik Scharlau Author
Posted on Thu, 04/07/2011 - 16:01

Hi Fernando,

may anyone correct me if I'm wrong, but here is my idea:

Increasing jvm's memory will not directly help returning allocated memory. But a little JVM tuning can make the garbage collection via the Xms and Xmn parameters more efficient (look here for example: http://www.caucho.com/resin-3.0/performance/jvm-tuning.xtp).

The ARIS installation and administrationguide(unfortunatly only the german one) lists some hints on memory optimization within the scripting chapter:

 

Use database objects within the report only as long as necessary.

After this database objects should not be held in memory.

You can do this for example by following these measures:
  •  Keep no lists of ARIS objects in global Variables.
  •  With the help of "short" functions data is kept only as long as needed.
  •  It is advisable to empty lists containing many objects, if they are no longer needed.
This will support the Java Garbage collection to delete these objects from memory. Although the memory requirements of Java and Java scripts can not be controlled directly, more memory will be provided to the report execution by following these measures.

 

Not really helpful in my opinion. Anyway, I don't know if the garbage collection is working properly for ARIS reports. It's supposed to return memory of an object if there is no reference to this object left(garbage collection by reference).

But there is something else you can try:

Use the delete operator for (global) lists of objects. There is only one problem: It is impossible to delete objects with the DontDelete-Attribute set, such as variable and function declarations in global and function code. So you have to use a little workaround to do so.

First of all: the delete operater returns true if the deletion was successful respectively false if the deletion failed. So here is an Example:

var globalModelList = new Array();
function main(){
    var selectedGroups = ArisData.getSelectedGroups();
    globalModelList = getModelsMatchingCertainCriteriaOutOf(selectedGroups);
    // DO SOMETHING WITH globalModellist
    delete selectedGroups; // false 
    typeof(selectedGroups); // object
}
// other code 
main();
delete globalModelList; // false
typeof(globalModelList); // object

What you have to do is setting variables explicitly as a an object's property. Look at the different use of selectedGroups in the following snippit:

var globalModelList = new Array();
function main(){
    var localVariablesObject = new Object();
    localVariablesObject.selectedGroups = ArisData.getSelectedGroups();
    globalModelList = getModelsMatchingCertainCriteriaOutOf(localVariablesObject.selectedGroups);
    // DO SOMETHING WITH globalModellist
    delete localVariablesObject.selectedGroups; // true 
    typeof(localVariablesObject.selectedGroups); // undefined
}
// other code
main();
delete globalModelList; // false
typeof(globalModelList); // object

Now can do the same with globalModelList, except that you don't have to create a variable object, because you already got one(this).

var GLOBAL_OBJECT = this;
GLOBAL_OBJECT.globalModelList = new Array();
function main(){
    var localVariablesObject = new Object();
    localVariablesObject.selectedGroups = ArisData.getSelectedGroups();
    globalModelList = getModelsMatchingCertainCriteriaOutOf(localVariablesObject.selectedGroups);
    // DO SOMETHING WITH globalModellist
    delete localVariablesObject.selectedGroups; // true 
    typeof(localVariablesObject.selectedGroups); // undefined
}
// other code
main();
delete globalModelList; // true
typeof(globalModelList); // undefined

Let me know, if this is of any help to you.

Regards,

Maik

0

Featured achievement

Rookie
Say hello to the ARIS Community! Personalize your community experience by following forums or tags, liking a post or uploading a profile picture.
Recent Unlocks

Leaderboard

|
icon-arrow-down icon-arrow-cerulean-left icon-arrow-cerulean-right icon-arrow-down icon-arrow-left icon-arrow-right icon-arrow icon-back icon-close icon-comments icon-correct-answer icon-tick icon-download icon-facebook icon-flag icon-google-plus icon-hamburger icon-in icon-info icon-instagram icon-login-true icon-login icon-mail-notification icon-mail icon-mortarboard icon-newsletter icon-notification icon-pinterest icon-plus icon-rss icon-search icon-share icon-shield icon-snapchat icon-star icon-tutorials icon-twitter icon-universities icon-videos icon-views icon-whatsapp icon-xing icon-youtube icon-jobs icon-heart icon-heart2 aris-express bpm-glossary help-intro help-design Process_Mining_Icon help-publishing help-administration help-dashboarding help-archive help-risk icon-knowledge icon-question icon-events icon-message icon-more icon-pencil forum-icon icon-lock