Why is MATLAB R2019b very slow when clearing large variables from memory?

조회 수: 12 (최근 30일)
yunhui zhou
yunhui zhou 2020년 1월 28일
댓글: Walter Roberson 2020년 2월 3일
I have a workstation with Intel i7 9900K and 64 GB (DDR4, 3200 MHz) of RAM. My recent project requires me to load 3-8 large structure arrays into the memory, occupying 10-40 GB of memory in total. I find that MATLAB (R2019b update 3) gets very slow when clearing these large variables from workspace. The "clear" command takes 30-60 seconds to finish, and from the Windows task manager I can see the memory usage gradually goes down. This happens even when aborting a function which loads the variables inside. The system has a pagefile of around 9 GB on an SSD but the memory usage (including all programs) never goes beyond 85% of total memory. I hope to know whether such slow clearing speed is a expected MATLAB behavior?
  댓글 수: 4
Guillaume
Guillaume 2020년 2월 3일
That's 50000*20 arrays that all need to be freed individually. That's a lot of arrays!
Also, if you're not on 2019b update 4, see if installing the update improves performance.
Walter Roberson
Walter Roberson 2020년 2월 3일
Symbolic expressions stored in the symbolic engine can also be pretty slow to be removed, even when you quit MATLAB.

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Matrix Indexing에 대해 자세히 알아보기

태그

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by