qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Chris Friesen <chris.friesen@windriver.com>
To: Paolo Bonzini <pbonzini@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] is there a limit on the number of in-flight I/O operations?
Date: Fri, 18 Jul 2014 16:48:32 -0600	[thread overview]
Message-ID: <53C9A440.7020306@windriver.com> (raw)
In-Reply-To: <53C97FEB.9060208@redhat.com>

On 07/18/2014 02:13 PM, Paolo Bonzini wrote:
> Il 18/07/2014 18:22, Chris Friesen ha scritto:
>> On 07/18/2014 09:24 AM, Paolo Bonzini wrote:
>>> Il 18/07/2014 16:58, Chris Friesen ha scritto:
>>>>
>>>> I've recently run up against an interesting issue where I had a number
>>>> of guests running and when I started doing heavy disk I/O on a virtio
>>>> disk (backed via ceph rbd) the memory consumption spiked and triggered
>>>> the OOM-killer.
>>>>
>>>> I want to reserve some memory for I/O, but I don't know how much it can
>>>> use in the worst-case.
>>>>
>>>> Is there a limit on the number of in-flight I/O operations?  (Preferably
>>>> as a configurable option, but even hard-coded would be good to know as
>>>> well.)
>>>
>>> For rbd, there is no such limit in QEMU except the size of the virtio
>>> ring buffer, but librbd may add limits of its own.
>>>
>>> For files, there's no limit if you use aio=threads, but the more I/O
>>> operations you trigger the more threads QEMU will create.  After 10
>>> seconds of idle the threads will be destroyed.
>>>
>>> Also for files, the limit is 128 per disk if you use aio=native.  You
>>> can only change it by recompilation only.
>>
>> Has anyone looked at enforcing some limits?  I'm okay with throttling
>> performance if necessary, but I really don't want to trigger the
>> OOM-killer.
>
> I forgot about "-drive ...,iops_max=NNN". :)

I'm not sure it's actually useful though, since it specifies the max IO 
operations per second, not the maximum number of in-flight operations.

If the far end can't keep up with the requested rate of operations, then 
the number of in-flight operations is going to grow even if you throttle 
the number of operations per second.

Chris

  reply	other threads:[~2014-07-18 22:48 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-18 14:58 [Qemu-devel] is there a limit on the number of in-flight I/O operations? Chris Friesen
2014-07-18 15:24 ` Paolo Bonzini
2014-07-18 16:22   ` Chris Friesen
2014-07-18 20:13     ` Paolo Bonzini
2014-07-18 22:48       ` Chris Friesen [this message]
2014-07-19  5:49         ` Paolo Bonzini
2014-07-19  6:27           ` Chris Friesen
2014-07-19  7:23             ` Paolo Bonzini
2014-07-19  8:45               ` Benoît Canet
2014-07-21 14:59                 ` Chris Friesen
2014-07-21 15:15                   ` Benoît Canet
2014-07-21 15:35                     ` Chris Friesen
2014-07-21 15:54                       ` Benoît Canet
2014-07-21 16:10                       ` Benoît Canet
2014-08-23  0:59                         ` Chris Friesen
2014-08-23  7:56                           ` Benoît Canet
2014-08-25 15:12                             ` Chris Friesen
2014-08-25 17:43                               ` Chris Friesen
2015-08-27 16:37                                 ` Stefan Hajnoczi
2015-08-27 16:33                               ` Stefan Hajnoczi
2014-08-25 21:50                             ` Chris Friesen
2014-08-27  5:43                               ` Chris Friesen
2015-05-14 13:42                                 ` Andrey Korolyov
2015-08-26 17:10                                   ` Andrey Korolyov
2015-08-26 23:31                                     ` Josh Durgin
2015-08-26 23:47                                       ` Andrey Korolyov
2015-08-27  0:56                                         ` Josh Durgin
2015-08-27 16:48                               ` Stefan Hajnoczi
2015-08-27 17:05                                 ` Stefan Hajnoczi
2015-08-27 16:49                               ` Stefan Hajnoczi
2015-08-28  0:31                                 ` Josh Durgin
2015-08-28  8:31                                   ` Andrey Korolyov
2014-07-21 19:47                       ` Benoît Canet
2014-07-21 21:12                         ` Chris Friesen
2014-07-21 22:04                           ` Benoît Canet
2014-07-18 15:54 ` Andrey Korolyov
2014-07-18 16:26   ` Chris Friesen
2014-07-18 16:30     ` Andrey Korolyov
2014-07-18 16:46       ` Chris Friesen
     [not found] <1000957815.25879188.1441820902018.JavaMail.zimbra@redhat.com>
2015-09-09 18:51 ` Jason Dillaman

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=53C9A440.7020306@windriver.com \
    --to=chris.friesen@windriver.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.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;
as well as URLs for NNTP newsgroup(s).