Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss] LVM vs File system file for KVM Virtual Machines?



> Mark,
>
> Think about it this way:  when using a file on the file system the VM has
> a whole extra layer of indirection that it has to go through, because it
> has to go through the FS layer in the VM, then the block layer in the VM,
> then the VM system storage layer, and then the FS layer in the host, then
> block layer in the host..   Whereas if it's just an LVM container then you
> can bypass the FS layer in the host completely.  So I would always expect
> the direct LVM container to be faster and more resource efficient.

I think that was my assumption to begin with. Great minds think alike!
That being said, there is caching in the file system layer that we
wouldn't get with LVM, but that may hinder more than help. There may be a
little more I/O involved with a file because not only would the VM be
managing the file system, the host would have to manage the meta-data for
the file. Not too much, I don't think, because the file based vm would be
more or less fixed in size.



>
> -derek
>
> On Thu, March 29, 2012 10:49 am, markw at mohawksoft.com wrote:
>> Hopefully without getting into an augment about the pros and cons of LVM
>> vs btrfs or zfs, does anyone want to discuss the pros and cons of LVM
>> "device" for a virtual machine vs a file on a file system for a virtual
>> machine?
>>
>> So, do you create a 30G file on a file system, like EXT3, jfs, or xfs
>> and
>> use that or do you create a 30G LVM device and use it directly? There
>> are
>> some benefits to using LVM and with the 3.x kernel, you could even use a
>> "thin provisioned" device.
>>
>> Which do you suspect would be more resource efficient? Which do you
>> think
>> would have faster I/O?
>>
>> I've set up two systems, one on a jfs file system and one on an "old
>> style" LVM partition. (Fully allocated). I don't see much of a
>> difference.
>> I suspect the LVM based system should be more efficient because it does
>> not have to go through the intermediate file system layer to get to the
>> device layer. Internally, the VM sees the LVM device as its own device.
>>
>> _______________________________________________
>> Discuss mailing list
>> Discuss at blu.org
>> http://lists.blu.org/mailman/listinfo/discuss
>>
>
>
> --
>        Derek Atkins                 617-623-3745
>        derek at ihtfp.com             www.ihtfp.com
>        Computer and Internet Security Consultant
>
>





BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org