Determining optimal value for Java Heap Space for deployed application

2 views (last 30 days)
I've got a deployed application that runs well for most of my users, but occasionally for users with limited RAM (around 2GB) I'm running into "Out of Memory" errors when the code tries to execute something of the form:
A_Squared = A_D.^2 + A_Q.^2
Where, A_D and A_Q are both 6001x901 matrices of doubles. Because of what those matrices contain, I can't reduce the size without losing data fidelity in my calculation results. For a different set of input conditions, those matrices are about 2/3 of the size stated above, and the application executes without problems.
The long-term solution is optomizing the code for memory usage, which is something that I plan to do, but it isn't a top priority right now.
It was suggested by Matlab Support that it could be worth trying to increase the Java Heap Space by including the java.opts file in the deployed package (RE: http://www.mathworks.com/support/solutions/en/data/1-1KY3U1/index.html).
Anyone have experience with including this with deployed packages? If so, is there a good way to determine an optimal value to set the heap memory value to for a deployed application (without having direct access to the problem machine? I'm looking at a case where my machine has Win7, quad core processor, 4GB RAM; and the problem machine is WinXP, dual core, 2GB RAM).
Thanks.

Answers (0)

Categories

Find more on Application Deployment in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!