Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


How does KVM memory swap work?
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

How does KVM memory swap work?

aglodekaglodek Member
edited October 2013 in General

As I understand it, under OpenVZ, Burst RAM or vSwap (that is artificially slowed down RAM) is still RAM, allocated to the container if overall resource use permits. This is pretty clear to me.

Of late, some KVM VPS providers have started showing additional "Swap" memory in their offers. So how does this work exactly? The provider sets aside a partition with some space allocated to swapping on a HDD (or perhaps an SSD if you're lucky)? So nothing to do with actual RAM - am I reading this right?

Comments

  • I'm guessing swap in kvm will really swap to disk. but that's just a guess.

  • tuxtux Member

    Same way as physical computer

  • smansman Member
    edited October 2013

    Swap is just a portion of the kvm storage space partitioned for swap. Or alternatively it can be a file inside the VM. In keeping with KVM virtualization philosophy, it's treated the same in the VM as it would be on a physical server.

    We allocate a tiny bit just in case some daemon or application expects it but haven't really seen it being used and don't think it's necessary for anything we do. Moving forward we won't be including swap in our KVM templates just to simplify things. It can always be added later. Just boot Gparted iso and create a swap partition or alternatively make a swap file inside the VM.

    Thanked by 2perennate aglodek
Sign In or Register to comment.