From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KAc8Y-0003kb-9Q for qemu-devel@nongnu.org; Sun, 22 Jun 2008 22:50:34 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KAc8W-0003ja-DC for qemu-devel@nongnu.org; Sun, 22 Jun 2008 22:50:33 -0400 Received: from [199.232.76.173] (port=42280 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KAc8W-0003jW-7l for qemu-devel@nongnu.org; Sun, 22 Jun 2008 22:50:32 -0400 Received: from il.qumranet.com ([212.179.150.194]:11335) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KAc8V-0003dz-QV for qemu-devel@nongnu.org; Sun, 22 Jun 2008 22:50:32 -0400 Message-ID: <485F0F5B.6060002@qumranet.com> Date: Mon, 23 Jun 2008 05:50:03 +0300 From: Avi Kivity MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] qcow2: improve I/O performance with cache=off References: <1213972680.3859.34.camel@frecb07144> In-Reply-To: <1213972680.3859.34.camel@frecb07144> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Laurent Vivier wrote: > Hi, > > this patch improves qcow2 I/O performance when used with cache=off. > > It modifies qcow_aio_[read|write]_cb() to read as many clusters as > possible per bdrv_aio_[read|write](). > > Write allocation is still slow though. For fixing this, I think the only way is to modify get_cluster_offset() to accept and return an extent. > I've made some tests with dbench: > > WITHOUT PATCH WITH PATCH > > ide, cache=off,snapshot=off 20.8494 MB/sec 24.0711 MB/sec > ide, cache=off,snapshot=on 20.9349 MB/sec 24.5031 MB/sec > scsi,cache=off,snapshot=off 21.0264 MB/sec 24.6119 MB/sec > scsi,cache=off,snapshot=on 21.4184 MB/sec 24.6739 MB/sec > > The gain is approximately 15%. > I don't think dbench is a good test for this as it involves the guest pagecache. 'dd' or 'fio' would be much more indicative. -- Do not meddle in the internals of kernels, for they are subtle and quick to panic.