I have been looking for a way to monitor the memory consumption for matlab, but have been unable to do so. What I am interested in is the peak memory for built in functions and that cannot be measured with the matlab profiler, since these functions are already compiled.
Peak memory issues is seldom documented in matlab, which means that to find out what the problem is I will need to monitor the memory usage myself. I have already tried to use the resource manager in windows, but I had problems finding anything. I could be that there is no problem but, it can also mean that the sampling rate is to low. I use windows 7.
This question may not be related only to matlab, but since I have problems in matlab I will tag it so.
There is a nice script on the Matlab File Exchange that monitors Matlab's memory usage over time. It basically updates a figure at a specified time interval in background. (Since it relies on Matlab's memory
function, it is unfortunately only working on Windows systems.)
I don't know if this suits your needs, but since memory
measures the total memory used by the Matlab process, this should also include that of the built-in functions.
However, when Matlab is under heavy load, other functions might take execution preference and the figure might not get updated as desired. In this case, one should consider monitoring the memory outside of Matlab, using tools like e.g. perfmon
or Process Explorer, see this question for a more detailed treatise.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With