From: Anthony Liguori <anthony@codemonkey.ws>
To: Alexander Graf <agraf@suse.de>
Cc: Prasad Joshi <prasadjoshi124@gmail.com>,
Pekka Enberg <penberg@kernel.org>, Avi Kivity <avi@redhat.com>,
linux-kernel@vger.kernel.org, kvm@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Ingo Molnar <mingo@elte.hu>,
Sasha Levin <levinsasha928@gmail.com>,
Cyrill Gorcunov <gorcunov@gmail.com>,
Asias He <asias.hejun@gmail.com>,
Jens Axboe <jaxboe@fusionio.com>
Subject: Re: [ANNOUNCE] Native Linux KVM tool v2
Date: Wed, 15 Jun 2011 17:44:17 -0500 [thread overview]
Message-ID: <4DF935C1.4020000@codemonkey.ws> (raw)
In-Reply-To: <4DF93010.1040006@codemonkey.ws>
On 06/15/2011 05:20 PM, Anthony Liguori wrote:
> On 06/15/2011 05:07 PM, Alexander Graf wrote:
>>
>> On 16.06.2011, at 00:04, Anthony Liguori wrote:
>>
>>> On 06/15/2011 03:13 PM, Prasad Joshi wrote:
>>>> On Wed, Jun 15, 2011 at 6:10 PM, Pekka Enberg<penberg@kernel.org>
>>>> wrote:
>>>>> On Wed, Jun 15, 2011 at 7:30 PM, Avi Kivity<avi@redhat.com> wrote:
>>>>>> On 06/15/2011 06:53 PM, Pekka Enberg wrote:
>>>>>>>
>>>>>>> - Fast QCOW2 image read-write support beating Qemu in fio
>>>>>>> benchmarks. See
>>>>>>> the
>>>>>>> following URL for test result details:
>>>>>>> https://gist.github.com/1026888
>>>>>>
>>>>>> This is surprising. How is qemu invoked?
>>>>>
>>>>> Prasad will have the details. Please note that the above are with Qemu
>>>>> defaults which doesn't use virtio. The results with virtio are little
>>>>> better but still in favor of tools/kvm.
>>>>>
>>>>
>>>> The qcow2 image used for testing was copied on to /dev/shm to avoid
>>>> the disk delays in performance measurement.
>>>>
>>>> QEMU was invoked with following parameters
>>>>
>>>> $ qemu-system-x86_64 -hda<disk image on hard disk> -hdb
>>>> /dev/shm/test.qcow2 -m 1024M
>>>
>>> Looking more closely at native KVM tools, you would need to use the
>>> following invocation to have an apples-to-apples comparison:
>>>
>>> qemu-system-x86_64 -drive
>>> file=/dev/shm/test.qcow2,cache=writeback,if=virtio
>>
>> Wouldn't this still be using threaded AIO mode? I thought KVM tools
>> used native AIO?
>
> Nope. The relevant code is:
>
>> /* blk device ?*/
>> disk = blkdev__probe(filename, &st);
>> if (disk)
>> return disk;
>>
>> fd = open(filename, readonly ? O_RDONLY : O_RDWR);
>> if (fd < 0)
>> return NULL;
>>
>> /* qcow image ?*/
>> disk = qcow_probe(fd, readonly);
>> if (disk)
>> return disk;
>>
>> /* raw image ?*/
>> disk = raw_image__probe(fd, &st, readonly);
>> if (disk)
>> return disk;
>
> It uses a synchronous I/O model similar to qcow2 in QEMU with what I
> assume is a global lock that's outside of the actual implementation.
>
> I think it lacks some of the caching that Kevin's added recently though
> so I assume that if QEMU was run with cache=writeback, it would probably
> do quite a bit better than native KVM tool.
>
> It also turns out that while they have the infrastructure to deal with
> FLUSH, they don't implement it for qcow2 :-/
>
> So even if the guest does an fsync(), it native KVM tool will never
> actually sync the data to disk...
>
> That's probably why it's fast, it doesn't preserve data integrity :(
Actually, I misread the code. It does unstable writes but it does do
fsync() on FLUSH.
Regards,
Anthony Liguori
next prev parent reply other threads:[~2011-06-15 22:44 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-15 15:53 [ANNOUNCE] Native Linux KVM tool v2 Pekka Enberg
2011-06-15 16:30 ` Avi Kivity
2011-06-15 17:10 ` Pekka Enberg
2011-06-15 20:13 ` Prasad Joshi
2011-06-15 20:23 ` Sasha Levin
2011-06-15 20:49 ` Prasad Joshi
2011-06-15 21:53 ` Anthony Liguori
2011-06-15 22:04 ` Anthony Liguori
2011-06-15 22:07 ` Alexander Graf
2011-06-15 22:20 ` Anthony Liguori
2011-06-15 22:44 ` Anthony Liguori [this message]
2011-06-16 5:41 ` Pekka Enberg
2011-06-16 6:21 ` Pekka Enberg
2011-06-16 9:24 ` Christoph Hellwig
2011-06-16 9:34 ` Pekka Enberg
2011-06-16 9:48 ` Christoph Hellwig
2011-06-16 9:57 ` Ingo Molnar
2011-06-16 9:57 ` Pekka Enberg
2011-06-16 10:02 ` Christoph Hellwig
2011-06-16 11:22 ` Ingo Molnar
2011-06-16 11:25 ` Christoph Hellwig
2011-06-16 11:40 ` Ingo Molnar
2011-06-16 11:51 ` Christoph Hellwig
2011-06-17 7:21 ` Jeff Garzik
2011-06-16 5:45 ` Pekka Enberg
2011-06-16 7:24 ` Ingo Molnar
2011-06-16 7:33 ` Pekka Enberg
2011-06-16 8:07 ` Ingo Molnar
2011-06-16 9:09 ` Stefan Hajnoczi
2011-06-16 5:29 ` Stefan Hajnoczi
2011-06-16 5:42 ` Pekka Enberg
2011-06-15 21:41 ` Anthony Liguori
2011-06-16 14:28 ` Michael S. Tsirkin
2011-06-16 15:01 ` Asias He
2011-06-19 8:15 ` Michael S. Tsirkin
2011-06-16 14:48 ` Pekka Enberg
2011-06-16 22:50 ` Anthony Liguori
2011-06-17 1:03 ` Sasha Levin
2011-06-17 5:00 ` Stefan Hajnoczi
2011-06-17 13:41 ` Sasha Levin
2011-06-17 13:45 ` Anthony Liguori
2011-06-17 5:11 ` Stefan Hajnoczi
2011-06-17 7:31 ` justin
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=4DF935C1.4020000@codemonkey.ws \
--to=anthony@codemonkey.ws \
--cc=agraf@suse.de \
--cc=akpm@linux-foundation.org \
--cc=asias.hejun@gmail.com \
--cc=avi@redhat.com \
--cc=gorcunov@gmail.com \
--cc=jaxboe@fusionio.com \
--cc=kvm@vger.kernel.org \
--cc=levinsasha928@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=penberg@kernel.org \
--cc=prasadjoshi124@gmail.com \
--cc=torvalds@linux-foundation.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox