public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Marcelo Tosatti <mtosatti@redhat.com>
To: Avi Kivity <avi@qumranet.com>
Cc: Anthony Liguori <aliguori@us.ibm.com>, kvm@vger.kernel.org
Subject: Re: [PATCH] Avoid fragment virtio-blk transfers by copying
Date: Wed, 25 Jun 2008 12:55:52 -0300	[thread overview]
Message-ID: <20080625155551.GA3728@dmt.cnet> (raw)
In-Reply-To: <48622193.6080401@qumranet.com>

On Wed, Jun 25, 2008 at 01:44:35PM +0300, Avi Kivity wrote:
> Anthony Liguori wrote:
>> A major source of performance loss for virtio-blk has been the fact that we
>> split transfers into multiple requests.  This is particularly harmful if you
>> have striped storage beneath your virtual machine.
>>
>> This patch copies the request data into a single contiguous buffer to ensure
>> that we don't split requests.  This improves performance from about 80 MB/sec
>> to about 155 MB/sec with my fibre channel link.  185 MB/sec is what we get on
>> native so this gets us pretty darn close.
>>
>>   
>
> If the guest issues a request for a terabyte of memory, the host will  
> try to allocate it and drop to swap/oom.  So we need to either fragment  
> beyond some size, or to avoid copying and thus the need for allocation.

The maximum request size for Linux guests is 512K (after tuning
virtio-blk guest driver, current max is 124K). I'm not sure what the max
number of requests is, but I guess is between 128 and 1024, Anthony?

So with the current configuration your concern is not an issue. BTW,
what is maximum request size for the Windows driver?

Point is that the guest is responsible for limiting the amount of data
in-flight. A malicious guest can only hurt itself by attempting to DoS
the host, with proper memory limits in place. IMO this issue should not
be handled in the virtio-blk backend.


  reply	other threads:[~2008-06-25 16:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-24 18:16 [PATCH] Avoid fragment virtio-blk transfers by copying Anthony Liguori
2008-06-24 19:47 ` Marcelo Tosatti
2008-06-25 10:44 ` Avi Kivity
2008-06-25 15:55   ` Marcelo Tosatti [this message]
2008-06-29  9:56     ` Avi Kivity
2008-06-25 16:28   ` Anthony Liguori
2008-06-29 10:01     ` Avi Kivity

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=20080625155551.GA3728@dmt.cnet \
    --to=mtosatti@redhat.com \
    --cc=aliguori@us.ibm.com \
    --cc=avi@qumranet.com \
    --cc=kvm@vger.kernel.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