01-21-2011 02:47 PM
I've noticed this ever since LV8.5 (I am currently using LV2010 with IMAQ 4.5), that whenever I minimize my exe, the RAM usage in Windows Task Manager drops dramatically. My exe loads and unloads lots of images and the RAM usage goes up to around 500MB for the exe. As soon as I minimize the exe window it drops to about 13MB.
Can anyone explain why this is happening?
Thanks,
Bruce
Solved! Go to Solution.
01-21-2011 03:56 PM - edited 01-21-2011 03:56 PM
@BruceMoyer wrote:
I've noticed this ever since LV8.5 (I am currently using LV2010 with IMAQ 4.5), that whenever I minimize my exe, the RAM usage in Windows Task Manager drops dramatically. My exe loads and unloads lots of images and the RAM usage goes up to around 500MB for the exe. As soon as I minimize the exe window it drops to about 13MB.
Can anyone explain why this is happening?
Thanks,
Bruce
I think you answered it for yourself
The operating system will take care of most of your resource allocations (except of course memory management explicitly done in LabVIEW or otherwise).
When you minimize your VI, there is nothing to display, so your OS will not load it until the window is back up again.
01-22-2011 11:22 AM
It is very likely that when you minimize your application, Windows decides to page most of that memory to disk, because the application is probably not being used actively. Therefore Windows decides to reclaim the memory for other active applications.
You can test this by showing the Virtual Memory column in Windows Task Manager. There you see all the paged memory your application is using. Your app is still using the same amount of memory, but Windows can store that in Virtual Memory on your hard disk until it's needed again.
01-23-2011 07:46 AM
Try minimizing Internet Explorer or similar with a couple of tabs similar and the same thing will happen.
/Y
01-24-2011 07:04 AM
Thanks, I never thought to look at the Virtual RAM usage in Windows Task Manager. Actually I didn't know that it even existed on a process level. I guess what surprised me is how quickly the RAM dropped, I would have thought that it would take a few seconds to cache to disk, but I guess that is done while the data is being loaded into RAM.
I was wondering if there was any benefit to programmatically minimizing and then reopening the window to reduce RAM usage but I guess this wouldn't be of any benefit.
Thanks,
Bruce
01-26-2011 07:54 AM
@BruceMoyer wrote:
Thanks, I never thought to look at the Virtual RAM usage in Windows Task Manager. Actually I didn't know that it even existed on a process level. I guess what surprised me is how quickly the RAM dropped, I would have thought that it would take a few seconds to cache to disk, but I guess that is done while the data is being loaded into RAM.
I was wondering if there was any benefit to programmatically minimizing and then reopening the window to reduce RAM usage but I guess this wouldn't be of any benefit.
Thanks,
Bruce
I did see a benfit when workin large data sets and 3d graphs. A graph that would take 45 minutes to refresh wiht the window open could do the same in about a minute if the screen was minimized.
Ben