Browse Our Free Resources
550 6th Av SW
821A Bloor Street West
409 Granville St
436 York Road
Eclipse Heap Usage Viewer Plugin
Web Age Solutions Inc.
Memory usage by Eclipse or any Eclipse based product such as Rational Application Developer (RAD) can suffer from two memory related bottlenecks.
You can use the heap viewer plugin to accurately estimate the heap needs of Eclipse. This will help you set the optimal maximum and initial value of the heap size.
The plugin has been tested using Eclipse 3.1 and RAD 6.0.1.
Installation and Usage
Download the plugin from this link. Extract it directly in the Eclipse root directory. If you are using RAD, extract it in <RAD Install>\eclipse directory. This will create the com.webage.plugin.HeapView_1.0.0 directory under the plugins directory.
Start Eclipse or RAD. From the menubar select Windows->Show View->Other.
Expand Heap View and select Heap Values. Click on OK.
The view shows the following information.
The values are refreshed every 5 seconds.
Tuning Heap Settings
First, let us find out how to configure the heap values. The heap size parameters can be supplied in the command line as shown below. For example:
eclipse.exe -vmargs -Xms176m -Xmx256m
This will set the initial heap size to 176MB and the maximum heap size to 256M.
For RAD, use the following command line:
rationalsdp.exe -vmargs -Xms176m -Xmx1024m
To tune heap, first set a low initial heap size, say 10MB. Start Eclipse or RAD. Do basic development for a few minutes. Note the current heap size. In example below, the heap has grown from 10MB to 52MB.
If we start Eclipse or RAD using that much of initial heap size, there will be no need to grow the heap. This will improve performance.
Similarly, if you see that the heap size growing to a point too close the heap maximum, you are likely to run out of memory. Increase the heap size maximum in the command line to avoid the possibility of Eclipse or RAD behaving strangely due to an out of memory situation.
Copyright © 2012-2016 Web Age Solutions Inc.