Monitoring native heap and Java heap memory

Java heap

When a Java Virtual Machine (JVM) is started in Service Manager process, the Service Manager process defines the minimum and the maximum amount of memory that is allocated for JVM. The minimum and maximnm vary for different kinds of Service Manager processes. For servlet container processes that needs more java processing, the minimum and maximum defined are 256M. For processes that are shortlived and do not need much java processing, the minimum and maximum defined are 64M and 96M. You can override these default values by using the JVMOption parameters. For example, you could set JVMOption0:-Xms128M, JVMOption1:-Xmx256M, to provide minimum and maximum values of 128M and 256M for java heap memory.

The JVM internally divides the allocated heap into 4 different memory pools. The Service Manager process monitors for the low memory condition on "Tenured Gen(Old Generation)" only. Therefore, the low memory condition still can occur on other memory pools like "Eden Space (Young Generation)" or "Survivor Space".

Native heap

Windows: The Windows operating system has APIs that fetch the current memory usage of a process and the maximum that can be allocated for that process. We monitor the native heap using the API's monitoring thread, and turn the low memory condition processes on or off accordingly.

Unix Systems: Not implemented.

Note The monitoring the memory of Service Manager processes reduces the chance of a servletcontainer running out of memory, but does not completely prevent it.

Related topics

Monitoring memory in Service Manager processes
Logging memory monitoring

Related topics

Servlet parameters
Debugging parameters
Parameter: log4jDebug
Parameter: memorypollinterval