Ramdisk virtualization madness. [Debian/KVM/VGA passthrough]

s0lid

Active Member
Feb 25, 2013
258
33
28
Tampere, Finland
I had this idea while back when I read about VGA passthrough on Xen, "What if I installed a Windows VM on a Ramdisk and passed through a decent VGA into it." Sadly at the time I did not have enough ram on any of my servers to do that, but now I do as I quite recently bought a Dell R710 with 144GB of ECC REG. But we're not going to use that fancy dell for this, but the C6100 that I built into Lian-Li PC-A05B chassis.

So this will be the hardware we'll be working with:
  • 1x C6100 in Lian-Li PC-A05B
  • 2x L5630
  • 12x8GB ECC REG
  • 128GB Intel SSD
  • HD6950
  • Software wise the plan goes as follows
  • install debian to the ssd
  • install kvm
  • enable vga passthrough and dedicate the 6950 for vt-d
  • add 64GB tmpfs to fstab
  • install windows 7 to tmpfs
  • benchmark the ramdisk, play with the vm
  • create script for syncing the tmpfs image to ssd.
More to come.
 
Last edited:

Mike

Member
May 29, 2012
482
16
18
EU
So, are you going to use a Xen kernel, or just KVM in the normal kernel? If you use the latter than you have more options on device passthrough and high performance (virt)io devices.
If you create a mirrored MD than i think it is intelligent enough to use the fast part of the array to read from. You would just have to 'rebuild' it every time you want to start the VM from RAM.
 

s0lid

Active Member
Feb 25, 2013
258
33
28
Tampere, Finland
So, are you going to use a Xen kernel, or just KVM in the normal kernel? If you use the latter than you have more options on device passthrough and high performance (virt)io devices.
If you create a mirrored MD than i think it is intelligent enough to use the fast part of the array to read from. You would just have to 'rebuild' it every time you want to start the VM from RAM.
KVM will be the virtualization platform I'll be using, and I've to agree the virtio is very powerful.
I looked in to doing ramdisk+ssd raid1 and found that using mdadm raid1 with ssd set to --write-mostly will get me desired result where data is written to both devices but is read only from the ramdisk. But this requires testing, as I could not find any solid information how rebuild is going to work when booting, or should I just copy contents of ssd onto the ramdisk before mdadm loads at boot.
 

s0lid

Active Member
Feb 25, 2013
258
33
28
Tampere, Finland
First results with ramdisk:



Forgot to run hdtune IOPS test, that should be interesting :D
Next I ought to figure out how to add the 580 GTX as vfio device...
 
  • Like
Reactions: Patrick

s0lid

Active Member
Feb 25, 2013
258
33
28
Tampere, Finland
Too bad the virtualization or virtio kills the small transfer sizes. When benchmarking writes on the ramdisk from the host I got around 1.4GBps with bs=4k.
Also hdtunes IOPS was limited to 1.3-2kiops.