I have a Linux machine (CentOS 7) running Matlab 2017a that gets very sluggish after running a Simulink model. The machine has 8 cores, 32 GB of memory. Running the model uses up about 7 GB of memory. While examining the results of the model, I noticed that any command that I run in the command window either a) takes a few minutes to execute or b) quickly spits out the answer but then Matlab becomes unresponsive for a few minutes. I notice by watching the System Monitor while Matlab is out to lunch that it seems to be slowly allocating about 100 MB of memory and then quickly releasing it - over and over and over again. This behavior occurs even when I ask Matlab to do something simple, like
>> 2*2
I have been scouring these answers for something that resolves this issue. There is no network drive in my search path. I have no figures open. I have allocated 4 GB of java heap space. I am not sure if this is a java, Simulink, or Matlab problem. I thought that it was a display issue (running GEFORCE GTX TITAN X) but by eliminating plots and only asking Matlab to solve a simple arithmetic problem, I eliminated that possibility.
Thanks for your help.

댓글 수: 3

Walter Roberson
Walter Roberson 2017년 12월 1일
Are there graphics being processed in the background at the time?
For example, in newer releases, fplot() of a function thinks for a moment initially and then returns to the command line, possibly before having displayed. If the function is steep or discontinuous, it might take fplot a while of background processing to finish the drawing. fplot() does not just plot once and then return because fplot() is adaptive to the current range, re-calculating the points upon zoom in and zoom out.
You are probably not using fplot() with Simulink; the point is that there could be some background graphics leading to the behaviour you observe.
Alan
Alan 2017년 12월 1일
I have the simulink model window still up, but that is about it besides the Matlab GUI and the Editor. No graphs are being plotted through Matlab or Simulink. When I give it a simple arithmetic problem (2*2), what fplot() is happening? It is something that running the simulink model with this much data is doing to the memory manager, because after starting Matlab it does not behave this way until running simulink. I can bring up the java runtime and run the gc and no change in behaviour.
Walter Roberson
Walter Roberson 2017년 12월 1일
You probably have no fplot() running -- I was demonstrating that in at least some cases, graphics keep processing in the background for complicated graphics, even after returning to the command line.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

도움말 센터File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

제품

질문:

2017년 12월 1일

댓글:

2017년 12월 1일

Community Treasure Hunt

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

Start Hunting!

Translated by