Effacer les filtres
Effacer les filtres

Java heap size is not accessing all available RAM

14 vues (au cours des 30 derniers jours)
Atifah
Atifah le 28 Avr 2017
Commenté : Atifah le 2 Mai 2017
Hi,
I am currently running 64-bit Matlab (making use of 64-bit Java) on a server with 128GB of RAM. Matlab version is R2016a.
In my Matlab preferences, I cannot increase the Java heap size beyond 32GB - this is causing my code to fail (it is unable to read ~70 million rows of data from SQL).
This has worked in the past, and the java heap size setting gave me the option to slide across to 128GB, but as I said it is now only letting me increase to 32GB.
I am not in a position to change the code - this was written by someone else, and I do not have the sign off to change this at the moment.
Any help will be appreciated.
Thanks,
  3 commentaires
Walter Roberson
Walter Roberson le 28 Avr 2017
"I do not have the sign off to change this" means that the person does not have the authority to make any changes to the code, only to the running environment.
Atifah
Atifah le 2 Mai 2017
Nothing in the code has changed - the dataset is slightly larger, but this is not causing the problem because I have tried to run on subsets too. There have probably been some infrastructure changes since it was last run (but the server has the same processing power).
"No sign off to change" means I have not been assigned the time to make major changes to the code (it needs a big rewrite, but has worked in the past). The answer below has actually fixed it - thanks all!

Connectez-vous pour commenter.

Réponse acceptée

Prannay Jain
Prannay Jain le 1 Mai 2017
If the maximum value, allowed by this slider, is too small for the requirements, it could be directly adjusted by editing:
"C:\Users\%USERNAME%\AppData\Roaming\MathWorks\MATLAB\%matlabversion%\matlab.prf"
You can get this path using,
>> prefdir
1. Open this file with a text editor.
2. Modify "JavaMemHeapMax" value. It should look like
JavaMemHeapMax=I128000
3. Restart MATLAB for changes to reflect.
The Preferences UI will display a warning in Java Heap Memory, that it is larger than recommended.
  1 commentaire
Atifah
Atifah le 2 Mai 2017
Thank you so much! This worked - I have tried so many things before posting this question.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Call Java from MATLAB dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by