KVM: disks on tmpfs?

achekalin

Member
Jun 17, 2011
74
0
6
Hello,

I try to speed up my Win 2003 r2 x86 KVM machine. Due to fact the machine is 32 it can not access more that 4 Gb of RAM (well, even lower value), and the load is pretty high, so it uses swap high enough.

As my host server has 32 Gb of RAM, I was wonder if it is possible to create some tmpfs-based directory, and create virtual disk in this directory, and then move swap within VM to that 'disk'. I understand that I'll need to restore that disk file every time I boot host machine but that's simple task, so no hassle in that.

But when I did that (create tmpfs dir, add it as disks stogage in PVE 2.2 - I test that on spare machine so I was able to install fresh PVE just in case - then create VM 'disk' in that dir), the VM simple won't run without any logical reason.

So the question is: can that config be used, booted and run, or KVM (or maybe Proxmox itself) prevents VM from use such a in-RAM disks? Thank you for your advice!
 
Hello,

I try to speed up my Win 2003 r2 x86 KVM machine. Due to fact the machine is 32 it can not access more that 4 Gb of RAM (well, even lower value), and the load is pretty high, so it uses swap high enough.

As my host server has 32 Gb of RAM, I was wonder if it is possible to create some tmpfs-based directory, and create virtual disk in this directory, and then move swap within VM to that 'disk'. I understand that I'll need to restore that disk file every time I boot host machine but that's simple task, so no hassle in that.

But when I did that (create tmpfs dir, add it as disks stogage in PVE 2.2 - I test that on spare machine so I was able to install fresh PVE just in case - then create VM 'disk' in that dir), the VM simple won't run without any logical reason.

So the question is: can that config be used, booted and run, or KVM (or maybe Proxmox itself) prevents VM from use such a in-RAM disks? Thank you for your advice!

Hi, I never tested it, but I think it should work. (Or maybe something is missing in tmpfs to works like a true filesystem...).

But why not simply add more memory to your vms and disable swap inside them ? It should be the same thing...
 
But why not simply add more memory to your vms and disable swap inside them ? It should be the same thing...

I'd like to, but the guest OS is 32 bit one (as I pointed above), so it can not see more memory dispute the fact I can easily add it to VM itself. The s/w in the guest OS prevents me from a) migrating to any x64 OS b) split user base between two or more equal VMs. You know, 'legacy software', something that need to be maintained and never touched in any way.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!