10

I read quite a lot of advice to switch from file-image VM storage, to partition/LVM volume based.

The claim is that partition/LVM are much faster then image files.

The downside in my opinion, is that one no longer have the whole VM in a single, easy to copy and migrate file.

Can anyone advice on this, especially if there indeed any difference in new versions of Xen, and if there are any IO benchmarks to support it?

Thanks!

3 Answers 3

9

Creating a block level access to virtual machine state, as opposed to a file level access will always be faster because there is a layer of abstraction removed.

I would recommend the LVM approach. Don't forget, you can always backup the LVM volume just like a file. There isn't much difference between the two. LVM is also quite flexible in terms of relocating the data.

Just because the abstract notion of a file doesn't exist anymore doesn't mean it is bad. The performance gains may be considerable, and with a little bit of broad thinking you can plumb your infrastructure just like it was a file.

I often make a partition for QEmu virtual machines. Then I can use dd to save and restore it. One file system (the virtual machines) running down to block level is better than a file in a filesystem with a filesystem atop.

Good luck

0
6

I'll just add to all the answers above, by reminding you that LVM has a somewhat easy to use snapshot mechanism. This makes it pretty easy to backup or clone running VM's by simply making a snapshot, cloning or backing the VM up, and removing the snapshot. All without downtime.

1
  • +1 for snapshots. I think that functionality gets missed alot!
    – Aiden Bell
    Jul 17, 2009 at 19:39
0

There are a few (I came across maybe two of them) benchmarks of file image vs. LVM partitions on the net (it's not that hard to google them). Although somewhat dated, it would seem that LVM is usually faster (if by a tiny margin). That was enough for me, so I went with LVM schema. As far as the copying goes, you still can mount the LVM logical volume, targzip it and transfer it to another location. It's not that much harder. And LVM makes it much easier to expand your server storage.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .