From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:49748) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TGmP2-00022T-Vy for qemu-devel@nongnu.org; Wed, 26 Sep 2012 03:51:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TGmOx-0006GX-6Z for qemu-devel@nongnu.org; Wed, 26 Sep 2012 03:51:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43929) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TGmOw-0006GQ-T8 for qemu-devel@nongnu.org; Wed, 26 Sep 2012 03:51:23 -0400 Message-ID: <5062B3F7.704@redhat.com> Date: Wed, 26 Sep 2012 09:51:19 +0200 From: Kevin Wolf MIME-Version: 1.0 References: <506044DE.9060701@gmail.com> <5060524C.2070509@redhat.com> <5060E147.3080306@gmail.com> <5061B2AB.8050509@redhat.com> <50623CBC.8050101@gmail.com> In-Reply-To: <50623CBC.8050101@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] linux aio and cache mode List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: ching Cc: qemu-devel@nongnu.org Am 26.09.2012 01:22, schrieb ching: > On 09/25/2012 09:33 PM, Kevin Wolf wrote: >> Am 25.09.2012 00:40, schrieb ching: >>> On 09/24/2012 08:30 PM, Kevin Wolf wrote: >>>> Am 24.09.2012 13:32, schrieb ching: >>>>> Hi all, >>>>> >>>>> My host is qemu-1.1.1 and x64 kernel 3.5.4. The guest is using aio="native" >>>>> >>>>> I am trying to use unsafe cache mode to boost i/o performance. >>>> aio=native requires the image to be opened with O_DIRECT, i.e. >>>> cache=none or cache=directsync. If you specify a different cache option, >>>> it will silently fall back to aio=threads. >>>> >>>> Kevin >>>> >>> will qemu log a entry for the silent fallback? >> No, that's why it's silent. :-) >> >>> Reason: >>> >>> I am testing sparse image on btrfs with mount option: rw,noatime,space_cache,autodefrag,inode_cache >>> >>> i encounter a speed difference (around 2X-3X) between aio=threads,cache=unsafe and aio=native,cache=unsafe >>> >>> aio=threads is much faster, i guest there is conflict between "autodefrag" and linux aio >> This is odd. The point is that with cache=unsafe it shouldn't even be >> using Linux AIO in the first place. I can't see why there would be any >> difference between aio=threads and aio=native with cache=unsafe. >> >> Kevin >> > > is it possible to check the open mode of file and whether it is using aio at runtime? You can attach strace and look for open/pwritev/iosubmit and friends. I did that yesterday with qemu-io and didn't see any iosubmit for 'qemu-io -k -t unsafe'. Kevin