From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:50722) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R1yTJ-0008Rg-6X for qemu-devel@nongnu.org; Fri, 09 Sep 2011 06:38:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R1yTI-0002cN-1V for qemu-devel@nongnu.org; Fri, 09 Sep 2011 06:38:09 -0400 Received: from mtagate2.uk.ibm.com ([194.196.100.162]:50617) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R1yTH-0002c8-OY for qemu-devel@nongnu.org; Fri, 09 Sep 2011 06:38:07 -0400 Received: from d06nrmr1707.portsmouth.uk.ibm.com (d06nrmr1707.portsmouth.uk.ibm.com [9.149.39.225]) by mtagate2.uk.ibm.com (8.13.1/8.13.1) with ESMTP id p89Ac3Ud030405 for ; Fri, 9 Sep 2011 10:38:04 GMT Received: from d06av10.portsmouth.uk.ibm.com (d06av10.portsmouth.uk.ibm.com [9.149.37.251]) by d06nrmr1707.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p89Ac3j52195674 for ; Fri, 9 Sep 2011 11:38:03 +0100 Received: from d06av10.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av10.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p89Ac1YS014953 for ; Fri, 9 Sep 2011 04:38:01 -0600 Date: Fri, 9 Sep 2011 11:38:01 +0100 From: Stefan Hajnoczi Message-ID: <20110909103801.GA26148@stefanha-thinkpad.localdomain> References: <20110909094436.GB23929@f15.cn.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110909094436.GB23929@f15.cn.ibm.com> Subject: Re: [Qemu-devel] Why qemu write/rw speed is so low? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Zhi Yong Wu Cc: kwolf@redhat.com, ryanh@us.ibm.com, aliguro@us.ibm.com, qemu-devel@nongnu.org On Fri, Sep 09, 2011 at 05:44:36PM +0800, Zhi Yong Wu wrote: > Today, i did some basical I/O testing, and suddenly found that qemu write and rw speed is so low now, my qemu binary is built on commit 344eecf6995f4a0ad1d887cec922f6806f91a3f8. > > Do qemu have regression? > > The testing data is shown as below: > > 1.) write > > test: (g=0): rw=write, bs=512-512/512-512, ioengine=libaio, iodepth=1 Please post your QEMU command-line. If your -drive is using cache=writethrough then small writes are slow because they require the physical disk to write and then synchronize its write cache. Typically cache=none is a good setting to use for local disks. The block size of 512 bytes is too small. Ext4 uses a 4 KB block size, so I think a 512 byte write from the guest could cause a 4 KB read-modify-write operation on the host filesystem. You can check this by running btrace(8) on the host during the benchmark. The blktrace output and the summary statistics will show what I/O pattern the host is issuing. I suggest changing your fio block size to 8 KB if you want to try a small block size. If you want a large block size, try 64 KB or 128 KB. Stefan