Start a new topic

Guidelines and Best practices to increase Java heap size and other memory attributes of the Informatica Cloud Secure Agent

FAQ :  What are the guidelines and best practices to increase Java heap size and other memory attributes of the Informatica Cloud Secure Agent ?

Answer

There are multiple attributes that can be configured for a secure agent to increase the memory properties for different operations of the secure agent.

- Tomcat JRE


If you hit memory / Java heap related error messages at :

  • Test connection
  • Metadata fetch ( error at design time of a task after selecting a connection or an object )
  • Agent logs ( infaagent logs or tomcat log)
  • ICRT failures on agent showing java out of memory or java heap space error on infaagent log


Then, increase the memory options on the attribute named INFA_MEMORY that is under tomcat JRE. The format is “-Xms***m -Xmx****m -XX:MaxPermSize=***m”

- DTM : If you hit java out of memory or java heap space or out of memory or perGen space error messages at run time of a task (either in session log or activity log or both), then memory attributes need to be defined as JVMOptions under DTM. The default options will be JVMOption1, JVMOption2, JVMOption3 and so on. If you have already used all the available JVMOptions, then you can add more as custom properties on the agent, making sure the sequence is maintained ( if the default ones stop at JVMOption5, then the custom properties should start with JVMOption6 and should have type as DTM and subtype as INFO). Each JVMOption can take 1 JVM property, The main JAVA memory properties are -Xms**m, -Xmx****m and -XX:MaxPermSize=***m.

Details: Each of the memory attributes mentioned above (in INFA_MEMORY and JVMOptions) denote the following:

-Xms***m : The initial value- The Java virtual machine will start with this amount of memory. The memory value mentioned here will be allocated as soon as the Java process starts.

-Xmx****m : The maximum value- the maximum amount of memory the Java virtual machine can allocate as heap. After the Java process starts, as needed, it will keep allocating more space to store its objects, the allocation can continue up until it hits this maximum setting, once this maximum value is hit, the java process will crash complaining about java heap space or out of memory.

-XX:MaxPermSize=***m : The maximum permissible size the JVM can use at a time. If the JVM needs more than the specified amount, then the java process will crash complaining about permGem Space issue.  
The value to set for the above described attributes:

-Xms**m : Since this is the base / initial value, the value given can be small like 64m or 128m. Since this is just the initial value, it is just used for initialization of process and the java process will eventually keep allocating space as and when it needs.


-Xmx***m : Since this is the maximum value to which the Java heap can grow, the value has to be generally large enough to hold all the java objects and classes. On a 32 bit agent, this value cannot generally go beyond 1024M for windows and 2048M for Linux because of oS limitations for a 32 bit application. However, it is not recommended to go beyond 900Mfor 32 bit agents to avoid memory issues for all the tasks in general and the agent itself (Since the property is on the agent, it will affect all the jobs). If the process fails with 900M or higher on  a 332 bit agent, the best option is to go for 64 bit agent as a 4 bit agent gives room for more space. For a 64 bit agent, the -Xmx value has vitually no boundaries, but is only limited by the system memory ( the amount of memory that the OS can allocate on the system). Generally on a 64 bit agent, the value can be about 1024M or 2048M. However, if your tasks fail with java heap space or out of memory errors then you will have to increase it further. The value to which it has to be increased will be a trial and error as the value is dependent on the amount of data, the classes loaded, how java and OS stores the data.

-XX:MaxPermSize=***m : This can be set to an average value of about 512M, however make sure that the value is smaller than -Xmx value. This needs to be increased only when the error is about permGen space.


Login or Signup to post a comment