[mdlug] Linux VMs - virtual disk best practices

David Lee Lambert davidl at lmert.com
Sat Mar 23 12:19:00 EDT 2013


Rebuild the system.  If your VM-deployment process doesn't ensure that
alignment is reasonable, fix the process first.  That might involve
repartitioning, making a new filesystem at each level, plenty of "dd"
and "cp" ... possibly tuning filesystem flags as well, or carefully
preallocating files in the right order.

On the other had,  while poor alignment might cause a measurable
slowdown for some cases (say a maxed-out OLTP database or Microsoft
Exchange), in other cases I suspect it doesn't really matter overall in
many cases.  If most reads from files are sequential, and there isn't a
lot of fragmentation in the virtual filesystem, the virtual LVM, the
image-file itself, the filesystem, the host LVM, or the SAN device
mapping (and some of those levels may be absent), then any misalignment
will have little effect. If the virtual disk is only for booting,  and
the run-time data for the app is read from a NAS via CIFS or NFS, it
shouldn't matter at all.

El 3/21/2013 8:28 PM, Michael ORourke escribió:
> Which brings up the next logical question: how do you know if your
> virtual disks needs re-aligning?
>
> -Mike
> ----- Original Message ----- From: "Dan Pritts" <danno at dogcheese.net>
> To: "MDLUG's Main discussion list" <mdlug at mdlug.org>
> Sent: Thursday, March 21, 2013 1:45 PM
> Subject: Re: [mdlug] Linux VMs - virtual disk best practices
>
>
>> You are correct that alignment is absolutely critical.
>>
>> However, my experience with vmware, at least, is that the virtual
>> disks are aligned
>> properly.  So if you just throw your filesystem at a virtual disk I
>> think you should
>> be just fine.
>>
>> If you find that virtual disks are not aligned properly then you are
>> right, you could
>> compensate with the partition table.
>>
>> On Mar 21, 2013, at 11:41 AM, Jonathan Billings <billings at negate.org>
>> wrote:
>>
>>> One of the reasons why partition tables are good on virtual disks is
>>> because you often want to make sure to align the partitions with the
>>> blocks of the underlying storage.  You don't want to have an unaligned
>>> partition to cross the underlying storage's stripe boundary.  You also
>>> want to make sure that the block size of the filesystem matches up to
>>> the stripe/block/chunk size of the underlying storage.
>>>
>>> There's a nice graphic on this blog post that does a good job of
>>> visually demonstrating alignment performance benefits:
>>>
>>> http://blogs.vmware.com/vsphere/2011/08/guest-os-partition-alignment.html
>>>
>>>
>>> -- 
>>> Jonathan Billings <billings at negate.org>
>>> _______________________________________________
>>> mdlug mailing list
>>> mdlug at mdlug.org
>>> http://mdlug.org/mailman/listinfo/mdlug
>>
>> _______________________________________________
>> mdlug mailing list
>> mdlug at mdlug.org
>> http://mdlug.org/mailman/listinfo/mdlug
>>
>>
>> -----
>> No virus found in this message.
>> Checked by AVG - www.avg.com
>> Version: 2013.0.2904 / Virus Database: 2641/6192 - Release Date:
>> 03/20/13
>>
>
> _______________________________________________
> mdlug mailing list
> mdlug at mdlug.org
> http://mdlug.org/mailman/listinfo/mdlug


-- 
David Lee Lambert
Member ACM (david.lee.lambert at acm.org)
Ph# (616)676-7375 * IM: davidleelambert (Yahoo!, Skype and Google Talk)
"Justicia, Tierra y Libertad"



More information about the mdlug mailing list