Re: LVM thin provisioning and virt-manager

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

 



On Wed, Oct 16, 2013 at 02:24:59PM -0600, Chris Murphy wrote:
> 
> On Oct 16, 2013, at 1:50 PM, Richard W.M. Jones <rjones@xxxxxxxxxx> wrote:
> 
> > On Wed, Oct 16, 2013 at 01:09:25PM -0600, Chris Murphy wrote:
> >> Caching mode was none in all prior cases.
> > 
> > Note that cache=none is almost never useful.  It bypasses the host
> > cache so you don't get the benefit of having lots of free host memory,
> > plus causes endless pain because of filesystems that don't support
> > O_DIRECT (eg. tmpfs) or have buggy O_DIRECT support (eg. glibc on top
> > of older kernels).  It took me quite a long time to realize this -- it
> > was the default in libguestfs until quite recently :-(
>
> Curious, it seems [none] should perform almost as well as
> writeback,

No, because writeback uses the host memory as a very big cache.
Whereas none can only use the guest's memory, which is generally much
smaller than the host's memory.  Bigger cache = better performance,
all else being equal.

Note that writeback is only safe if your guest sends flush commands.
In your case this is true because you are installing new Linux guests.
But it would not be true if you were testing, (eg) RHEL 5.0 with LVM.

> and much better than writethrough.

Correct, because writethrough forces every write to disk.  This is
only needed for guests that don't send flush commands.

> But safer than either writeback or unsafe.

Writeback is safe, provided your guest sends flush commands.

Unsafe deliberately ignores guest flushes in the name of speed.

> I think the qcow2
> metadata preallocation is what's making a bulk of the difference in
> what I'm seeing.

Yes, quite likely this makes a substantial difference.  virt-v2v got a
big boost when we started to use preallocation=metadata.

> So is a compromise between performance and some safety to use
> writeback instead of unsafe?

Yes.  Libguestfs (now) lets you switch between writeback and unsafe,
and doesn't let you choose any of the other cache modes.  The
reasoning for this is described here:

https://github.com/libguestfs/libguestfs/commit/749e947bb0103f19feda0f29b6cbbf3cbfa350da

Note this reasoning only applies because with libguestfs we can be
sure that we have a modern kernel which sends flush requests.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://libguestfs.org
-- 
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux