public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: John Leach <john@brightbox.co.uk>
Cc: Stefan Hajnoczi <stefanha@gmail.com>,
	kvm@vger.kernel.org, Anthony Liguori <anthony@codemonkey.ws>
Subject: Re: bad O_DIRECT read and write performance with small block sizes with virtio
Date: Tue, 03 Aug 2010 19:14:10 +0300	[thread overview]
Message-ID: <4C584052.3030102@redhat.com> (raw)
In-Reply-To: <1280847471.13790.55.camel@dogen>

  On 08/03/2010 05:57 PM, John Leach wrote:
> On Tue, 2010-08-03 at 17:44 +0300, Avi Kivity wrote:
>> On 08/03/2010 05:40 PM, John Leach wrote:
>>> dd if=/dev/mapper/zero of=/dev/null bs=8k count=1000000 iflag=direct
>>> 8192000000 bytes (8.2 GB) copied, 3.46529 s, 2.4 GB/s
>>>
>>> dd if=/dev/mapper/zero of=/dev/null bs=8k count=1000000
>>> 8192000000 bytes (8.2 GB) copied, 5.5741 s, 1.5 GB/s
>>>
>>> dd is just using read.
>>>
>> What's /dev/mapper/zero?  A real volume or a zero target?
>>
> zero target:
>
> echo "0 21474836480 zero" | dmsetup create zero
>
> The same performance penalty occurs when using real disks though, I just
> moved to a zero target to rule out the variables of spinning metal and
> raid controller caches.

Don't, it's confusing things.  I'd expect dd to be slower with 
iflag=direct since the kernel can't do readahead an instead must 
roundtrip to the controller.  With a zero target it's faster since it 
doesn't have to roundtrip and instead avoids a copy.

-- 
error compiling committee.c: too many arguments to function


  reply	other threads:[~2010-08-03 16:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-02 17:15 bad O_DIRECT read and write performance with small block sizes with virtio John Leach
2010-08-02 17:46 ` Anthony Liguori
2010-08-02 20:50   ` Stefan Hajnoczi
2010-08-03  6:35     ` Dor Laor
2010-08-03 14:52       ` John Leach
2010-08-03 14:40     ` John Leach
2010-08-03 14:44       ` Avi Kivity
2010-08-03 14:57         ` John Leach
2010-08-03 16:14           ` Avi Kivity [this message]
2010-08-04 12:38             ` Stefan Hajnoczi

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=4C584052.3030102@redhat.com \
    --to=avi@redhat.com \
    --cc=anthony@codemonkey.ws \
    --cc=john@brightbox.co.uk \
    --cc=kvm@vger.kernel.org \
    --cc=stefanha@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox