[Gllug] Virtual disk allocation advice requested
Jose Luis Martinez
jjllmmss at googlemail.com
Thu Jul 3 23:11:16 UTC 2008
All the below reasoning is correct, but virtualization relies heavily
in the assumption that hardware is so fast that such considerations
are not necessary in most cases.
On Thu, Jul 3, 2008 at 10:24 AM, Richard Jones <rich at annexia.org> wrote:
> On Wed, Jul 02, 2008 at 04:26:30PM +0100, David L Neil Mailing list a/c wrote:
>> Elsewhere Rich has suggested adding deliberate delays. Do you have other
>> ideas?
>
> NFS 'bg' option.
>
> In reply to your other message about what services can be virtualized
> and which ones cannot: All services can be virtualized, but for
> services which have particularly high I/O requirements (eg. NFS
> serving) you should be careful.
>
> The issue is to do with context switching between domains. For
> example, suppose that you have a guest running the NFS server and
> another guest using the NFS server, something like this:
>
> +----------------+----------------+----------------+
> | dom0 | NFS server | using NFS |
> | | | |
> | bridge | | |
> +----------------+----------------+----------------+
>
> If the NFS server were running on baremetal, then any disk I/O or
> network I/O it does goes straight out to the hardware. However when
> the NFS server is virtualized, the dom0 kernel is involved in actions
> on behalf of the domain - eg. routing packets over the virtual network
> and handling disk I/O.
>
> So inevitably another guest using the NFS server involves a lot of
> switching, something like this:
>
> +----------------+----------------+----------------+
> | dom0 | NFS server | using NFS |
> | | | |
> | bridge | | |
> +----------------+----------------+----------------+
> <---------- request ---------------
> routed by dom0
> ------ request --->
> <----- disk I/O ---
> handled by dom0
> ------ disk I/O -->
> <----- response ---
> routed by dom0
> ----------- response -------------->
>
> Something like the above, I may have missed out or exaggerated some
> context switches, but I think that single request/response turns into
> on the order of 6 context switches. The situation is much worse if
> you're not paravirtualizing.
>
> In practice this is noticably slow. NFS over UDP was unusable when I
> tried it, and NFS(v3) over TCP is usable but slow.
>
> Rich.
>
> --
> Richard Jones
> Red Hat
> --
> Gllug mailing list - Gllug at gllug.org.uk
> http://lists.gllug.org.uk/mailman/listinfo/gllug
>
--
Gllug mailing list - Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug
More information about the GLLUG
mailing list