Clear Filters
Clear Filters

Application (Java + Matlab) uses too much memory only on cluster

3 views (last 30 days)
Hello
I have written a Java application which uses 8 Threads. The application is using matlabcontrol (matconsolectl) to open and use Matlab sessions from within Java. Currently I'm using 4 Matlab sessions (I have created a Matlab session pool).
If I'm running the application on my local PC, everything works. The overall memory consumption (Java + Matlab sessions) is about 6GB.
Now I want to execute it also on a cluster of my university. When submitting the job to the cluster, I have assigned 2GB of memory to each thread/core (in total 16GB of memory). The job finished without a problem but the resource usage is strange.
The maximum used memory is 6GB (max memory) as on my local machine. This is ok. But the maximally reserved memory is 45GB (max swap). Here is a short definition of max memory and max swap used by the cluster:
Max Swap is the memory allocated by an application and the Max Memory is the memory physically used (i.e., it is actually written to). As such, Max Swap > Max Memory. In most applications Max Swap is about 10–20% higher than Max Memory
I don't know why the allocated memory is so high. My assumption is that it has something to do with Matlab. So pehaps the opened Matlab session allocates that much memory (but never uses it). I did not find any option in Matlabcontrol to set the memory allocated.
Does somebody have any idea?

Answers (0)

Categories

Find more on Java Package Integration 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!