From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bill Davidsen Subject: Re: Setting disk parameters in a VM Date: Sun, 15 Mar 2009 16:42:50 -0400 Message-ID: <49BD684A.2000202@tmr.com> References: <49BA90B2.80804@tmr.com> <49BCDB2C.60407@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: KVM list To: Avi Kivity Return-path: Received: from mail.tmr.com ([64.65.253.246]:57968 "EHLO partygirl.tmr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751375AbZCOUnK (ORCPT ); Sun, 15 Mar 2009 16:43:10 -0400 In-Reply-To: <49BCDB2C.60407@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Avi Kivity wrote: > Bill Davidsen wrote: >> Based on a discussion in another list on ioschedulers, I added a few >> lines to my rc.local to set the scheduler to "noop" for disks with >> model QEMU*, to the scheduling in the VM will not be computing with >> the scheduling in the host. >> >> I wonder if the same thinking applies to the "rotational" feature >> added to /sys/block in 2.6.29, intended for SSD but probably >> appropriate for virtual and nbd devices as well. > > A virtual disk backed by a rotational physical disk probably should be > marked rotational, at least with cache=off. > The question was more regarding virtual drives backed by files, but even so I would think the bad case would be to let the host decide what methods should be used, rather than the VM, which is more likely to do things wrong based on incomplete information. Feel free to clarify if you think there's a case where the VM and the host should both be doing caching and scheduling. The only one I can imagine is if a USB port is passed to the VM and it has a storage device attached. That's not really a common configuration, I would guess. -- Bill Davidsen "Woe unto the statesman who makes war without a reason that will still be valid when the war is over..." Otto von Bismark