All of lore.kernel.org
 help / color / mirror / Atom feed
From: Theodore Ts'o <tytso@mit.edu>
To: Premysl Kouril <premysl.kouril@gmail.com>
Cc: Andi Kleen <andi@firstfloor.org>, linux-fsdevel@vger.kernel.org
Subject: Re: EXT4 vs LVM performance for VMs
Date: Fri, 12 Feb 2016 08:38:25 -0500	[thread overview]
Message-ID: <20160212133825.GJ11298@thunk.org> (raw)
In-Reply-To: <CA+rfndKXm4mTEztjijS4x9bBEzsY8fow7SuKHUcYmwrR+7XNvA@mail.gmail.com>

On Fri, Feb 12, 2016 at 10:09:39AM +0100, Premysl Kouril wrote:
> > Except for the last the backtraces you're showing are for futex locks,
> > which are not used by the kernel, but some user process. So the locking
> > problem is somewhere in the user space setup (perhaps in qemu).
> > This would indicate your ext4 set up is not the same as LVM.
> 
> Setup on the qemu/kvm is exactly the same (same test box, same command
> line arguments execept for the argument for the virtual machine disk
> which reference LVM volume or EXT4 based file)

You mentioned using qcow; if you're using qcow, than the userspace
qemu/kvm process will need to do its own locking to manage its own
space management file.

In general, if you need to do allocation management, either because
you are writing to a sparse file, and ext4 has to do block allocation,
or if you are writing to a fallocated file, and ext4 has to keep track
of whether a block has been written to that location before (and if
not, do a journalled transaction to clear the unwritten bit), there
will be extra work that has to be done at the qcow or ext4 layer that
doesn't have to be done at the LVM layer.  Of course, this work is
providing extra services (such as space management and/or not
revealing previously written block contents from another customer to
your current customer's VM, which might make your local data
protection authorities cranky).

So the devil is very much in the details of how you set up the
hypervisor, and "except for the argument for the virtual machine disk"
is leaving an awful lot unspecified.  Whether you preallocated and
pre-zeroed the file can make a difference, whether you are using
buffered or direct I/O based on the cache parameter makes a
difference, etc., etc.

Cheers,

						- Ted

  reply	other threads:[~2016-02-12 13:38 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-11 20:50 EXT4 vs LVM performance for VMs Premysl Kouril
2016-02-12  6:12 ` Andi Kleen
2016-02-12  9:09   ` Premysl Kouril
2016-02-12 13:38     ` Theodore Ts'o [this message]
2016-02-12 14:13       ` Premysl Kouril
2016-02-12 16:53         ` Theodore Ts'o
2016-02-12 17:38           ` Premysl Kouril
2016-02-13  2:15             ` Dave Chinner
2016-02-13 21:56               ` Sanidhya Kashyap
2016-02-13 23:40                 ` Jaegeuk Kim
2016-02-14  0:01                 ` Dave Chinner
2016-02-15 18:56               ` Premysl Kouril
2016-02-15 19:11                 ` Liu Bo
2016-02-15 23:10                 ` Dave Chinner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160212133825.GJ11298@thunk.org \
    --to=tytso@mit.edu \
    --cc=andi@firstfloor.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=premysl.kouril@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.