I’m setting up a server at home with Ubuntu and KVM running a number of Windows guests. The host OS and swap reside on an SSD while the VMs are placed on a zraid2 storage volume on mechanical disks. The host has 32GB RAM and I want to be prepared for committing (or overcommitting) a lot of RAM to the VMs.

Should I set up the Windows guests without pagefiles and instead let the host’s virtual memory take care of this in one large swap partition?

Or is it better to configure each Windows guest with its own pagefile? Possibly mount these pagefiles on the SSD?


This is probably a better question for Server Fault, but...

Set up the host with a pagefile on the SSD as big as you plan to overcommit. Then set up each Windows VM with the main OS partition (C:) with Windows Managed pagefile and set all the other disks pagefile to off.

  • Big thanks for sharing your experience! Just to check that I understand you correctly; the VMs' swap on their respective C: will reside inside their VM disk files on the zraid2 disk volume, right? It'd be great if you would like to share the reasoning (pros/cons) behind your choice :-) – mikewse Jul 13 '17 at 20:16
  • I read it here. It is my understanding by the 3rd paragraph, underneath important, that this means memory is assigned as part of the host process. Swap file is part of that memory and as long as you have the drivers then this should be exposed to the host so the host decides what happens. – NotoriousPyro Jul 14 '17 at 8:34
  • In fact I'm lying. I tried it myself and created some raw disk images on each VM, on different SSDs, with cache set to none/unsafe and it performs better. – NotoriousPyro Jul 14 '17 at 10:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.