Thursday, November 8, 2012

of disks and highly performing memories...

Assume you have enough host memory, and assume the following:

[root@parathyro-dom0]# mkdir /ram
[root@parathyro-dom0]# mount -t tmpfs -o size=50g,uid=107,gid=107,nr_inodes=10k,mode=0777 tmpfs /ram/

then assume you do something like this with it...

[root@parathyro-dom0]# time qemu-img create -f raw /ram/temp.raw 40G
Formatting '/ram/temp.raw', fmt=raw size=42949672960

real 0m0.002s
user 0m0.000s
sys 0m0.001s

Then a spot of this.
(You can't have cache="none" for this type of "drive"...)
[root@parathyro-dom0]# virsh edit parathyro-vm-clone

    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='writeback'/>
      <source file='/ram/temp.raw'/>
      <target dev='vdb' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>

You can see it does not take a great leap of imagination...

[any opinions here are all mine, and have absolutely nothing to do with my employer]
(c) 2011 James Cuff