2004-10-20 23:43:09

by Adam

[permalink] [raw]
Subject: I/O scheduler recomendation for Linux as a VMware guest

I am forced to spend quite a bit of time with my only relatively
powerful workstation booted into XP so I can do CAD work
(unfortunately Autodesk's Inventor only runs on Windows). Because of
this unfortunate situation I am planning my first attempt to get the
Linux install that I have on the other drive in this workstation to
boot using VMware. VMware has the ability to access raw disk
partitions (as apposed to partitions stored in a file on a host
partition) so I figure with some init and /etc magic I should be able
to boot the system using VMware and when I am not drawing in Inventor
I should be able to reboot and run Linux natively directly on the
hardware.

What I am wondering is what I/O scheduler should I be using when the
system is running within a VMware instance? I figure that Windows
will be scheduling the access to the physical hardware so I would
assume that I want a bare bones priority based scheduler, something
with the lowest possible overhead. Is this correct? If so, what
would that scheduler be?

IIRC someone (Ingo?) was working on the ability to change schedules
during runtime. How has that work progressed? Is it available in any
kernel trees?

--adam


2004-10-21 03:04:05

by Randy.Dunlap

[permalink] [raw]
Subject: Re: I/O scheduler recomendation for Linux as a VMware guest

Adam Hunt wrote:
> I am forced to spend quite a bit of time with my only relatively
> powerful workstation booted into XP so I can do CAD work
> (unfortunately Autodesk's Inventor only runs on Windows). Because of
> this unfortunate situation I am planning my first attempt to get the
> Linux install that I have on the other drive in this workstation to
> boot using VMware. VMware has the ability to access raw disk
> partitions (as apposed to partitions stored in a file on a host
> partition) so I figure with some init and /etc magic I should be able
> to boot the system using VMware and when I am not drawing in Inventor
> I should be able to reboot and run Linux natively directly on the
> hardware.
>
> What I am wondering is what I/O scheduler should I be using when the
> system is running within a VMware instance? I figure that Windows
> will be scheduling the access to the physical hardware so I would
> assume that I want a bare bones priority based scheduler, something
> with the lowest possible overhead. Is this correct? If so, what
> would that scheduler be?
>
> IIRC someone (Ingo?) was working on the ability to change schedules
> during runtime. How has that work progressed? Is it available in any
> kernel trees?

It was Jens Axboe.

It was merged _after_ 2.6.9, so it's currently available in
2.6.9-bkN. See this BK changeset (and the lwn.net article that
is referred to there):

http://linux.bkbits.net:8080/linux-2.5/cset@41752c48DmUvWjzNzOcvM8RlMCIF4A?nav=index.html|ChangeSet@-4w

--
~Randy

2004-10-21 08:38:52

by Jens Axboe

[permalink] [raw]
Subject: Re: I/O scheduler recomendation for Linux as a VMware guest

On Wed, Oct 20 2004, Adam Hunt wrote:
> I am forced to spend quite a bit of time with my only relatively
> powerful workstation booted into XP so I can do CAD work
> (unfortunately Autodesk's Inventor only runs on Windows). Because of
> this unfortunate situation I am planning my first attempt to get the
> Linux install that I have on the other drive in this workstation to
> boot using VMware. VMware has the ability to access raw disk
> partitions (as apposed to partitions stored in a file on a host
> partition) so I figure with some init and /etc magic I should be able
> to boot the system using VMware and when I am not drawing in Inventor
> I should be able to reboot and run Linux natively directly on the
> hardware.
>
> What I am wondering is what I/O scheduler should I be using when the
> system is running within a VMware instance? I figure that Windows
> will be scheduling the access to the physical hardware so I would
> assume that I want a bare bones priority based scheduler, something
> with the lowest possible overhead. Is this correct? If so, what
> would that scheduler be?

Probably deadline/cfq is the best fit, unless your host file is
perfectly laid out on disk in which case you can play with noop. As
Randy already pointed out, you can switch dynamically in the 2.6.9-bk
snapshots - so the best thing for you to do if you want to know for
sure, is to benchmark each of them for your workload. For most things
there should not be a noticable difference between cfq and deadline,
whether as makes a difference (for better or worse) is very work-load
dependent.

--
Jens Axboe