From: Ronny Hegewald Subject: bad write performance with qdisk with larger files in pv-domU Date: Fri, 3 Jun 2011 23:49:47 +0000 Message-ID: <201106032349.47095.ronny.hegewald@online.de> Mime-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Im using the following 32-bit setup: =2D xen 4.1.0=20 =2D upstream linux-kernel 2.6.39 as dom0 =2D linux 2.6.32 pv-domU that has several ext3 partitions mounted with qdis= k=20 (same behaviour with a 2.6.39 kernel, so i continued the investigation with= =20 the 2.6.32er kernel) Die read performance is good (ca. 60 MB/s) =46or smaller files (< 30-40 MB) the write-speed is ok. But if i copy a larger file (ca > 40 MB), the write speed decreases to ca. = 0,5=20 MB/s, after the first ca. 40 MBs are written. One reason for the bad performance might be that qdisk doesnt use AIO. For= =20 testing purposes i activated AIO in hw/xen_disk.c (i set use_aio=3D1), but = the=20 domU freezed shortly after the domU-kernel started. Is this performance-impact expected when no AIO is used?=20 I compared the raw-block implementation from xen-qemu 4.1.0 and current=20 upstream, in case xen-qemu has some missing bugfixes and found the followin= g=20 patch that looks a bit interesting commit 4899d10d142e97eea8f64141a3507b2ee1a64f52 Author: Stefan Hajnoczi Date: Mon Apr 19 13:34:11 2010 +0100 raw-posix: Use pread/pwrite instead of lseek+read/write This patch combines the lseek+read/write calls to use pread/pwrite instead. This will result in fewer system calls and is already used by AIO. =46rom the first look the patch cannot be backported 1:1, so i havent tried= it=20 yet, because i doubt that it can make such a huge difference. Or would it b= e=20 worth a try? Any other ideas how/what to investigate this issue further, in case the wri= te- speed should be better also without AIO? I know that the qdisk implementati= on=20 is expected to be slower, but i would expect at least lets say 5 MB/s.