Increase memory used by Matlab

195 views (last 30 days)
Gil
Gil on 15 Mar 2012
Commented: Frederick on 23 Nov 2014
I have Windows 7 (64 bits) and I would like to increase the performance of Matlab (version R2011b). I would like to know how to configure Windows to let Matlab to use more memory, because I think 513MB of 24GB is too low. The memory state is as follows:
<<
Maximum possible array: 45917 MB (4.815e+010 bytes) *
Memory available for all arrays: 45917 MB (4.815e+010 bytes) *
Memory used by MATLAB: 513 MB (5.382e+008 bytes)
Physical Memory (RAM): 24574 MB (2.577e+010 bytes)
* Limited by System Memory (physical + swap file) available.
>>
Can anyone help me?
Thank you very much in advance.
Gil
  2 Comments
Wenlong
Wenlong on 26 Jul 2012
Hi, Gil
May I know how to increase the memory size like you did?
Physical Memory (RAM): 24574 MB (2.577e+010 bytes)
Did you reset the virtual memory or just buy extra memory?
Many thanks in advance.
Best wishes Wenlong
KingLizard111
KingLizard111 on 9 Jun 2014
Hi, can I ask you how did you manage to have such a big Maximum possible array size?
Thank you

Sign in to comment.

Accepted Answer

Jan
Jan on 15 Mar 2012
The 513 MB means the currently used memory. This is increased automatically, when you define new arrays. "Memory available for all arrays: 45917 MB" seems like you are using a large virtual memory block, because you have installed 24 GB only.
  6 Comments
Jason Ross
Jason Ross on 15 Mar 2012
So if the memory used is only 282MB and the CPU is idling, I would guess that you are doing something else that is limiting the speed of execution -- are you reading a file from a disk or network?
But as Jan says, this quickly becomes a guessing game without knowing what is going on in the code.
Frederick
Frederick on 23 Nov 2014
Hi, I'm having the same problem as above, and I know it's because my script is written very badly. Would you mind helping me out with this? The piece of code taking hours and hours to calculate is:
Fr = zeros(length(omega_interp),t_end);
Fi = zeros(length(omega_interp),t_end);
for t = 1:t_end;
for i=1 : length(omega_interp);
for j = i+1 : length(omega_interp);
Fr(i,t) = Fr(i,t) + 2*sum(Amp(i)*Amp(j).*(QTFREAL_Final(i,j)+QTFREAL_Final(j,i)) .* cos(((omega_interp(i)-omega_interp(j))*t)+(eps(i)-eps(j))));
end
end
end
end
So what I want to do is compute (Second order wave drift forces) over time (thats the first for loop), over varying frequency (hence the two for loops in my script). I know matlab is better with matrices, however, i get a bit lost with the cos((omega(i)-omega(j))*t)

Sign in to comment.

More Answers (1)

Daniel Shub
Daniel Shub on 15 Mar 2012
If memory is available and MATLAB can benefit from it, MATLAB will uses it. When MATLAB doesn't need the memory anymore, it gives it back. You can see this with:
memory
Memory used by MATLAB: 262 MB (2.747e+008 bytes)
x = randn(1e8, 1); % This is all my poor little Windows box can handle
memory
Memory used by MATLAB: 1025 MB (1.075e+009 bytes)

Categories

Find more on Startup and Shutdown 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!