Sunday, May 27, 2012

Proactively Monitoring JDeveloper 11g IDE Heap Memory

There is possibility to monitor during runtime consumed heap and permgen memory by JDeveloper IDE process. It will show consumed memory, also allows to force garbage collection. This can be extremely useful when running JDev on less powerful hardware - developer could force garbage collection, just before entire memory is consumed and JDeveloper is freezing.

This post is based on JDev 11g R2 (but same applies for other JDev 11g versions).

Its fairly easy to enable JDeveloper 11g Heap Memory Monitor, add this property to jdev.conf file (located under JDEV_INSTALL/jdev/bin/ folder) and restart IDE:

AddVMOption -DMainWindow.MemoryMonitorOn=true

You will see in the IDE lower right corner - heap and permgen memory statistics will be available, along with garbage collector button:

I did a quick test - opened one JSPX file in Designer mode. Heap memory consumption increased from 90M to 256M, PermGen from 82M to 124M:

Next I invoked garbage collection process by clicking recycle bin icon:

Heap memory usage instantly dropped to 176M:

Don't worry, memory consumption is quite stable and not growing over time. I was trying to open multiple complex pages, close and open again - IDE was acquiring and then after some time releasing memory. It was consuming around 300M - 400M heap and 200M PermGen memory, when working with complex pages/fragments and ADF BC wizards:

Maximum range for heap memory is set in ide.conf file (located under JDEV_INSTALL/ide/bin/ folder). Default value of 800M is usually enough for ADF development:

1 comment:

Achinto Banerjee said...

As always nice post Andrejus.

I am facing one issue with jdev when I try to autogenerate task form for the Human task or open a already generated human task form project in jdeveloper. The jdev freezes very frequently in the above scenario. I am using . In all other projects the jdev works fine . Its only in the task form project that the jdev freezes frequently. Any idea how do i debug this.