How do I increase Java Heap Size to greater than 4 GB?
44 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I need to increase the Java heap size to 6GB or higher since I will be reading big data.
I have 64 bit Windows, and am running 64bit MATLAB 2013b + Java SE Runtime 1.7.0_40-b43 (64-bit).
But the Java Heap Size option in MATLAB only allows me to have up to 4 GB.
3 comentarios
Ken Atwell
el 22 de Abr. de 2014
Meshoo and Deniz, if you are have problems reading big data, can you describe that problem? As I've said below, increasing the Java heap does not seem like the right approach to me.
Respuestas (2)
Friedrich
el 22 de Abr. de 2014
Editada: Friedrich
el 22 de Abr. de 2014
Hi,
MATLAB uses 1/4 of your physical memory as maximum value for the heap space. You might be able to edit the matlab.prf file to increase that limit (however not sure if this might cause issues):
- From the Java Heap Memory section inside General window in Preferences tab, set thevalue of Java Heap size to some value other than the default.
- Close and Reopen MATLAB
- On the command window type the following command:>> prefdir
- Move to this directory and edit the MATLAB.PRF file.
- Locate the following line of command and change the value to desired Heap size in MB.JavaMemHeapMax=l4150 (This value of approximately 4GB is an example)
- Close and Reopen MATLAB again. Check with java.lang.Runtime.getRuntime.maxMemory if the change took effect.
0 comentarios
Ken Atwell
el 22 de Abr. de 2014
MATLAB does not use the Java heap to allocate workspace variables. If you are reading big data into your workspace, increasing the Java heap will probably have no effect, or possibly a negative effect.
1 comentario
Ver también
Categorías
Más información sobre Startup and Shutdown en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!