From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40934) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X0pPQ-0008BZ-3V for qemu-devel@nongnu.org; Sat, 28 Jun 2014 05:59:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X0pPP-0003BX-2n for qemu-devel@nongnu.org; Sat, 28 Jun 2014 05:59:00 -0400 Received: from mail-vc0-x235.google.com ([2607:f8b0:400c:c03::235]:48363) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X0pPO-0003BR-Uw for qemu-devel@nongnu.org; Sat, 28 Jun 2014 05:58:59 -0400 Received: by mail-vc0-f181.google.com with SMTP id il7so5823840vcb.40 for ; Sat, 28 Jun 2014 02:58:58 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <53ADE769.3060903@redhat.com> References: <20140627120129.GO12061@stefanha-thinkpad.muc.redhat.com> <53ADE769.3060903@redhat.com> Date: Sat, 28 Jun 2014 17:58:58 +0800 Message-ID: From: Ming Lei Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [regression] dataplane: throughout -40% by commit 580b6b2aa2 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Kevin Wolf , Fam Zheng , qemu-devel@nongnu.org, Stefan Hajnoczi , "Michael S. Tsirkin" On Sat, Jun 28, 2014 at 5:51 AM, Paolo Bonzini wrote: > Il 27/06/2014 20:01, Ming Lei ha scritto: > >> I just implemented plug&unplug based batching, and it is working now. >> But throughout still has no obvious improvement. >> >> Looks loading in IOthread is a bit low, so I am wondering if there is >> block point caused by Qemu QEMU block layer. > > > What does perf say? Also, you can try using the QEMU trace subsystem and > see where the latency goes. Follows some test result against 8589744aaf07b62 of upstream qemu, and the test is done on my 2core(4thread) laptop: 1, with my draft batch patches[1](only linux-aio supported now) - throughput: +16% compared qemu upstream - average time spent by handle_notify(): 310us - average time between two handle_notify(): 1591us (this time reflects latency of handling host_notifier) 2, same tests on 2.0.0 release(use custom Linux AIO) - average time spent by handle_notify(): 68us - average time between calling two handle_notify(): 269us (this time reflects latency of handling host_notifier) >>From above tests, looks root cause is late handling notify, and qemu block layer becomes 4times slower than previous custom linux aio taken by dataplane. [1], git://kernel.ubuntu.com/ming/qemu.git #master-0626-batch Thanks, -- Ming Lei