We are using jdk1.5 for our development. We have a Heap memory issue when our application is processing huge size of files. we are setting our JVM with the following options.
java -Djava.class.path= -Xss1024k -Xms512m -Xmx512m -Xmn100M
Our application is made for doing continues processeing by taking the input files and generateing the output in another format. In this scenario our heap size also keep growing and reaching the maximum heap limit (512 MB in this case). After reaching this maximum our application stops processing. We tried to clear the memory using gc(Garbage collection) through JAVA but still we found the heap memory is cleared but not released. Is there any other way to resize/clear the heap memory. Please let us know if you have any solutions.
I'm no expert in heaps but I would have had a look at your memory strategy here.
I've done something similar: we continously loaded huge spreadsheets, parsed/checked
them and grinded them it into a database.
The file load was done using a byte buffer that was set to an initial and big size, this
buffer was reused until a file that required a bigger buffer came along. At that point
the buffer was reallocated to accomodate the new size requirement. This method
kept the memory requirements comfortably low.
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL