Jump to content
Excelsior Forums
Sign in to follow this  
keith

memory usage

Recommended Posts

Windows XP, SP2, 0.99 GB RAM. When compiled using Excelsior Jet, adaptive memory, 5% gc ratio, the program seems to use a lot of memory vs the Eclipse development environment (-Xmx512m -Xms64m). Both runs were done on the same machine, within minutes of each other. Eclipse was not running during the Excelsior Jet run and vice-versa. Is there anything I can do to reduce the amount of memory my program is using when compiled under Excelsior Jet?

I have observed similar results with the gc ratio set to 1.1% but the diagnostics come from a  compile with gc ratio at 5%.

As a test I load two files into memory, merge1, then merge2. In other words, merge1 is still in memory when I load merge2.

Eclipse development environment

After loading merge1:

com.performanceplanningsystem.site.Site.postReadExternal(Site.java:3534) Memory total 66650112 - free 17819056 = used 48,831,056.

After loading merge2:

com.performanceplanningsystem.site.Site.postReadExternal(Site.java:3534) Memory total 90742784 - free 30318912 = used 60,423,872.

Excelsior Jet

After loading merge1:

com.performanceplanningsystem.site.Site.postReadExternal(Site.java:3534) Memory total 240119808 - free 168047600 = used 72,072,208.

After loading merge2:

com.performanceplanningsystem.site.Site.postReadExternal(Site.java:3534) Memory total 406458368 - free 131661912 = used 274,796,456.

Watching the performance monitor under Windows performance monitor (CTRL+ALT+DEL, performance tab) shows similar proportions of Page File Usage while loading merge1, then merge2 for each run environment.

The code I am using to get this information is:

[pre]   

    Throwable t = new Throwable();

    StackTraceElement[] ste = t.getStackTrace();

    Runtime s_runtime = Runtime.getRuntime ();

    long totalMemory = s_runtime.totalMemory (),

        freeMemory = s_runtime.freeMemory (),

        usedMemory = totalMemory - freeMemory;

    String message = ste[1] + " Memory total " + totalMemory + " - free " + freeMemory + " = used " + Setup.addCommas(Long.toString(usedMemory) + ".0", null, 0); //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$//$NON-NLS-4$

    logger.fine(message);[/pre]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×