From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54786) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X8A1i-0005kq-7F for qemu-devel@nongnu.org; Fri, 18 Jul 2014 11:24:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X8A1Z-0006WA-6D for qemu-devel@nongnu.org; Fri, 18 Jul 2014 11:24:50 -0400 Received: from mail-wi0-x22c.google.com ([2a00:1450:400c:c05::22c]:59429) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X8A1Y-0006W2-Vf for qemu-devel@nongnu.org; Fri, 18 Jul 2014 11:24:41 -0400 Received: by mail-wi0-f172.google.com with SMTP id n3so1063604wiv.11 for ; Fri, 18 Jul 2014 08:24:40 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <53C93C34.7030403@redhat.com> Date: Fri, 18 Jul 2014 17:24:36 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <53C9362C.8040507@windriver.com> In-Reply-To: <53C9362C.8040507@windriver.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] is there a limit on the number of in-flight I/O operations? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Chris Friesen , qemu-devel@nongnu.org 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. Paolo