From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Mueller Subject: Re: Shouldn't cache=none be the default for drives? Date: Thu, 8 Apr 2010 06:09:05 +0000 (UTC) Message-ID: References: <4BBC992D.3050905@gmail.com> <4BBD7215.3080204@msgid.tls.msk.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit To: kvm@vger.kernel.org Return-path: Received: from lo.gmane.org ([80.91.229.12]:43020 "EHLO lo.gmane.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754478Ab0DHGJR (ORCPT ); Thu, 8 Apr 2010 02:09:17 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1NzkvR-0001hv-95 for kvm@vger.kernel.org; Thu, 08 Apr 2010 08:09:13 +0200 Received: from 194.230.154.35 ([194.230.154.35]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 08 Apr 2010 08:09:13 +0200 Received: from thomas by 194.230.154.35 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 08 Apr 2010 08:09:13 +0200 Sender: kvm-owner@vger.kernel.org List-ID: Am Thu, 08 Apr 2010 10:05:09 +0400 schrieb Michael Tokarev: > 08.04.2010 09:07, Thomas Mueller wrote: [] >> This helped alot: >> >> I enabled "deadline" block scheduler instead of the default "cfq" on >> the host system. tested with: Host Debian with scheduler deadline, >> Guest Win2008 with Virtio and cache=none. (26MB/s to 50MB/s boost >> measured) Maybe this is also true for Linux/Linux. >> >> I expect that scheduler "noop" for linux guests would be good. > > Hmm. I wonder why it helped. In theory, host scheduler should not > change anything for cache=none case, at least for raw partitions of LVM > volumes. This is because with cache=none, the virtual disk image is > opened with O_DIRECT flag, which means all I/O bypasses host scheduler > and buffer cache. > > I tried a few quick tests here, -- with LVM volumes it makes no > measurable difference. But if the guest disk images are on plain files > (also raw), scheduler makes some difference, and indeed deadline works > better. Maybe you were testing with plain files instead of block > devices? ah yes, qcow2 images. - Thomas