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

Marcelo Tosatti wrote:
> 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?
>
>   

This is assuming 1 page per descriptor.  But the len field is 32 bits, 
so each descriptor can address up to 4GB.

> 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

I'd like kvm to be safe for use even without the rss controller.

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


  reply	other threads:[~2008-06-29  9:56 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
2008-06-29  9:56     ` Avi Kivity [this message]
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=48675C34.6010400@qumranet.com \
    --to=avi@qumranet.com \
    --cc=aliguori@us.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@redhat.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