× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I ran a test where I just repeatedly created a java string object and freed
its memory. There was no memory leak, meaning that my temporary storage
usage did not increase. On the other hand, there appears to be a memory
leak when doing a similar test in conjunction with creating a spreadsheet.
I found the following on IBM's website about java optimization. I wonder
if I'm dealing with a memory fragmentation issue, and that its affecting
performance also.


Also, look at the difference between the number of objects allocated and
the number of objects freed. If the gap between the two increases over
time, there is a memory leak.
Heap consumption indicating a possible leak during a heavy workload (the
application server is consistently near 100% CPU utilization), yet
appearing to recover during a subsequent lighter or near-idle workload, is
an indication of heap fragmentation. Heap fragmentation can occur when the
JVM can free sufficient objects to satisfy memory allocation requests
during garbage collection cycles, but the JVM does not have the time to
compact small free memory areas in the heap to larger contiguous spaces.

Another form of heap fragmentation occurs when small objects (less than 512
bytes) are freed. The objects are freed, but the storage is not recovered,
resulting in memory fragmentation until a heap compaction has been run.

Heap fragmentation can be reduced by forcing compactions to occur, but
there is a performance penalty for doing this. Use the Java -X command to
see the list of memory options.



From: "Dennis Lovelady" <iseries@xxxxxxxxxxxx>
To: "'RPG programming on the IBM i / System i'"
<rpg400-l@xxxxxxxxxxxx>
Date: 03/23/2010 12:29 PM
Subject: RE: Improving Excel generation performance through calling Java
Sent by: rpg400-l-bounces@xxxxxxxxxxxx



the RPG-Java interface is not optimized somehow. I am religiously
freeing
local references, as the HSSFR4 service program does. In fact, as a
further test, I put the new_String(TempStr) and
hssf_freeLocalRef(TempStr)
back in my procedure, even though they aren't used anymore, and
performance
went back to what is was in the older java code and temporary storage
jumped back up.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.