VMware Cloud Community
lethargos
Enthusiast
Enthusiast
Jump to solution

do virtual machines keep a copy of their RAM on the disk

Hello,

I've been having a discussion with someone who claims that on our vSphere the virtual machines keep a copy of their RAM memory on disk when they are running normally. This is not related to snapshots or anything like that, just during normal operation.

On top of that, he claims that this occupied space isn't even reported and you might not know how much space is actually being taken up. That second point I think is clearly implausible, but at the same time it's less important to me.

So the question is, is it plausible that the virtual machines would keep a continous copy of the RAM on the disk? All the disks we are using are Dependent mode. Are there any circumstances where this theory might apply, apart from moving a VM to another Host (which is done through CoW, as far as I know)?

Labels (1)
0 Kudos
1 Solution

Accepted Solutions
a_p_
Leadership
Leadership
Jump to solution

>>> So the question is, is it plausible that the virtual machines would keep a continous copy of the RAM on the disk?
No it isn't. If that would be the case, you'd have an awful performance.

A copy of the RAM is only stored on disk, for suspended VMs, or with a snapshot of a powered on VM for which this option is selected.

Regarding disk space for a powered on VM, yes a swap file is created at power on, which may be used in case the host if going to run out of resources. That swap file has the size of the provisioned RAM minus an optional memory reservation. It shows up in (is added to) the used disk space that's you can see on e.g. the VM's summary page.

André

View solution in original post

0 Kudos
2 Replies
a_p_
Leadership
Leadership
Jump to solution

>>> So the question is, is it plausible that the virtual machines would keep a continous copy of the RAM on the disk?
No it isn't. If that would be the case, you'd have an awful performance.

A copy of the RAM is only stored on disk, for suspended VMs, or with a snapshot of a powered on VM for which this option is selected.

Regarding disk space for a powered on VM, yes a swap file is created at power on, which may be used in case the host if going to run out of resources. That swap file has the size of the provisioned RAM minus an optional memory reservation. It shows up in (is added to) the used disk space that's you can see on e.g. the VM's summary page.

André

0 Kudos
lethargos
Enthusiast
Enthusiast
Jump to solution

Thanks for clearing it up. I was also very much sceptical of that theory, but I didn't want to leave anything out.

I remember that the complete theory was that the virtual machines would start automatically on another host without restarting in case the host failed, and that's why it needed access to the RAM which would be written to disk. And yes, in that case I would have expected awful performance. But I know this cannot be the case, because the virtual machines do have to reboot on another host if a host crashes.

In any case, I know that vmware offers vSphere Replication, which you have to configure explicitly and it's also limited to a certain number of VM cores and so on.

0 Kudos