From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bill Davidsen Subject: Re: What io scheduler to use inside guest VM? Date: Sat, 21 Mar 2009 20:52:35 -0400 Message-ID: References: <49C553CD.1070800@cs.bgu.ac.il> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit To: kvm@vger.kernel.org Return-path: Received: from main.gmane.org ([80.91.229.2]:44562 "EHLO ciao.gmane.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751339AbZCVAwt (ORCPT ); Sat, 21 Mar 2009 20:52:49 -0400 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1LlBvi-0005e6-1d for kvm@vger.kernel.org; Sun, 22 Mar 2009 00:52:46 +0000 Received: from pool-70-109-119-176.alb.east.verizon.net ([70.109.119.176]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 22 Mar 2009 00:52:46 +0000 Received: from davidsen by pool-70-109-119-176.alb.east.verizon.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 22 Mar 2009 00:52:46 +0000 In-Reply-To: <49C553CD.1070800@cs.bgu.ac.il> Sender: kvm-owner@vger.kernel.org List-ID: Piavlo wrote: > Hi, > > I use LVM volumes as guest VM disk. > I'm wondering if setting setting the io scheduler inside linux gest has > any effect (with virtio disk driver and with emulated scsi or ide driver) > And if it has affect what's better choice ? My thoughts is that if > changing the scheduler inside guest has affect - then it's probably > best to use noop scheduler inside the guest There is a recent thread here which I started on just that topic. The only case in which a guest schedular might have enough information is when a device is used raw, such as a USB connected device passed to the guest as a USB device. > and let the hypervisor linux decide according to it's scheduler. > So what I don't understand is if there are two levels of io scheduling , > one inside the guest (the redundant one and setting it to noop will > minimize it's affect) and other inside the hypervisor linux?(or just one > level in the hypervisor) > Probably with virtio driver tthere is no io scheduling inside the guest, > but is it so with emulated drivers too? > And also is there any difference in io scheduling if I use image file > instead of LVM? > You should look back at the recent thread, there are some good answers I got, but after reading them I decided that for file, partition, and LV backed mass storage, where the host will do ioscheduling the noop is probably best. If an unshared raw device is being used, it might be better to have the host noop it and the guest make the decisions, since it has all the information. -- Bill Davidsen "We have more to fear from the bungling of the incompetent than from the machinations of the wicked." - from Slashdot