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

Re: [virt-tools-list] block alignment



On Wed, Apr 20, 2011 at 10:41:20AM -0400, Gary Scarborough wrote:
> I was wondering if KVM on fedora suffered from the same type of
> block alignment problems that VMware has?  Do users need to be
> concerned about block alignment with KVM?

It's supposed to all be fixed in recent kernels (where recent ~~ RHEL 6
era, so say Fedora 12 onwards).  Hard drives themselves export
information about desired alignment, and this is supposed to go up
through all the layers, even into virtual machines.  You can test what
alignment information is available through all the layers using the
blockdev command.  Interesting blockdev options that have been added
recently include:

       --getalignoff
              Get alignment offset.
       --getdiscardzeroes
              Get discard zeroes support status.
       --getiomin
              Get minimum I/O size.
       --getioopt
              Get optimal I/O size.
       --getpbsz
              Get physical block (sector) size.

However .. it depends on various factors which can be outside our
control.  Notably:

Hard drives can just have wrong information.  They can also do stupid
stuff like lying about alignment (particularly the case with new 4K
sectors).

SANs might not supply the right info.

Some guests (notably Windows XP) don't align partitions correctly
unless you take some complex extra steps.  Shouldn't be a problem with
recent guests.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine.  Supports Linux and Windows.
http://et.redhat.com/~rjones/virt-df/


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