Page 1 of 2
releasing RAM from host
Posted: 5. Feb 2015, 01:28
by Peter-493
Hello,
my admin told me, that once I have created a VM the dedicated RAM for this VM will be subtracted from my available RAM on the host. Is this (permanently) true? I thought, only when the VM is running I have to share my RAM, else - with the paused or powered off VM - I have all my RAM to my host?
Secondly, this guy recommends to restart my Mac after I have deleted a VM (I regularly create linked clones to try out stuff and dedicate lots of RAM to these clones, but delete them after finishing work) to free the RAM. Sounds odd to me, maybe another misperception like the first assumption?
Thanks for any advice!
Peter-493
running VB 4.3.20 with extensions on Mac 10.9. and Win XP as guest.
Re: releasing RAM from host
Posted: 5. Feb 2015, 01:43
by loukingjr
How did your admin get hired???????
None of what he said is true.
Re: releasing RAM from host
Posted: 5. Feb 2015, 01:48
by socratis
RAM is freed whenever a process that allocated it goes away. Your VM is in a sense a process. The subtraction is there as long as the process is active, that is true. This is not true for paused, because the process is still active. Maybe saved-state?
You do not have to restart your Mac if you delete a VM. Linked clones or not.
Maybe there was a misunderstanding between hard drive space and RAM? That would fit much better what you're describing. For example your sentence would be correct:
"once I have created a VM the dedicated HD for this VM will be subtracted from my available HD on the host."
Re: releasing RAM from host
Posted: 5. Feb 2015, 01:56
by loukingjr
There is some confusion on how OSX handles memory management. It's not specific to VMs however. OSX will keep some closed programs processes open even after you are done with it in order to start it faster if you happen to restart a program or a guest. However, it's smart enough to know if that process is stil being used and will free whatever it needs to in order to run a different app.
If you launch Safari for example, browse, then quit Safari, some of the memory will have parts related to Safari in it. That's so it can start faster the next time you open it. Unless that memory is needed by something else.
If you do reboot after every program you start then quit it will flush out the memory. It's certainly not necessary. It also is bad for your computer.
Re: releasing RAM from host
Posted: 5. Feb 2015, 02:06
by socratis
loukingjr wrote:OSX will keep some closed programs processes open even after you are done with it ... some of the memory will have parts related to <AnyProcess> in it.
What parts would that be? Fonts? Libraries? Are you maybe referring to cache? Why is OSX different in that respect compared to what everybody and their mother are doing? Not a troll question. As they say in Wikipedia:
[citation needed].
Re: releasing RAM from host
Posted: 5. Feb 2015, 02:06
by loukingjr
I wanted to add, there are so called memory management programs for OSX that people charge for that are pointless. They are for people who are paranoid they are going to run out of memory and always want to see as much memory free as possible.
Re: releasing RAM from host
Posted: 5. Feb 2015, 02:11
by loukingjr
This is not really an OSX forum.
None the less, here is a brief explanation of what I was talking about from Apple...
Inactive: This information is in RAM but isn't actively being used, though it was recently used. For example, if you've been using Mail and then quit it, the RAM that Mail was using is marked as Inactive memory. Inactive memory is available for use by another application, just like free memory. However, if you open Mail before its inactive memory is used by a different application, Mail will open quicker because its inactive memory is converted to active memory, instead of loading it from the slower drive.
Re: releasing RAM from host
Posted: 5. Feb 2015, 02:52
by BillG
Such things are not restricted to OSX. I know for certain that Windows 7 has a similar setup for XP Mode. If you start another app needing XP Mode in less than about five minutes, the XP vm is still in memory if nothing else required the space in the mean time.
Re: releasing RAM from host
Posted: 5. Feb 2015, 02:58
by loukingjr
I think BillG could be correct and I didn't mean to imply OSX is the only OS that incorporates a similar memory management scheme. I also know, if I start up a guest in OSX it takes a certain amount of time (not much), if I shutdown the guest and immediately restart it it gets to the desktop much much faster.
Re: releasing RAM from host
Posted: 5. Feb 2015, 03:01
by socratis
Hard disk cache. You wouldn't even notice it if the performance gains would come from memory allocated or not.
Re: releasing RAM from host
Posted: 5. Feb 2015, 03:01
by loukingjr
socratis wrote:Hard disk cache.
uh, no, sorry.
Re: releasing RAM from host
Posted: 5. Feb 2015, 23:09
by Peter-493
socratis wrote:RAM is freed whenever a process that allocated it goes away. Your VM is in a sense a process. The subtraction is there as long as the process is active, that is true. This is not true for paused, because the process is still active. Maybe saved-state?
Thanks for this information, socratis, and to all for this insight into RAM use. You are mentioning an important distinction to be made: paused and saved-state. I understand that the paused VM will still block the RAM as it is still active, does anyone have a certain answer to saved-state? Thanks!
Peter-493
Re: releasing RAM from host
Posted: 5. Feb 2015, 23:53
by loukingjr
Saved State is basically a RAM dump of the guest to a disk file. It ends with the extension .sav. When you restore a Saved State it reads the file back into memory.
Re: releasing RAM from host
Posted: 6. Feb 2015, 00:06
by Peter-493
loukingjr wrote:Saved State is basically a RAM dump of the guest to a disk file. It ends with the extension .sav. When you restore a Saved State it reads the file back into memory.
cool, so it doesn´t take up my RAM and I have all my precious 8 GB for myself...
my precious...
Thanks for that, I will then from now on save the states rather than pausing the VMs.
Best
Peter
Re: releasing RAM from host
Posted: 6. Feb 2015, 02:32
by loukingjr
Actually the best thing to do is just shutdown the guest when you are finished with it.