Virtual PC Guy's Blog

-- Ben Armstrong, Virtualization Program Manager

Talking about core virtualization at Microsoft (Hyper-V, Virtual PC and Virtual Server).

Welcome to MSDN Blogs Sign in | Join | Help

Enabling host disk cache under Virtual PC

When you are running operating systems other than Windows NT / 2000 / XP / 2003 under Virtual PC you can gain a performance boost by enabling host side disk caching.  This is not enabled by default as it is not architecturally correct behavior - but I have seen situations where it can result in a 25% speed improvement in disk I/O intensive applications.

You can enable host disk caching by starting Virtual PC with the '-usehostdiskcache'.  This setting is then enabled globally on all virtual machines that you launch in that session.

Cheers,
Ben

Published Tuesday, February 01, 2005 1:19 AM by Virtual PC Guy

Comments

# re: Enabling host disk cache under Virtual PC

Hmmm, so perhaps thats why my Linux Session has some nasty lag when it tries to lanuch an app?

any way to perhaps set a reg-key or other setting to make this a default??

other than the right click on shortcut & set command line ?

Tuesday, February 01, 2005 2:16 AM by denny

# re: Enabling host disk cache under Virtual PC

Will it 'hurt' when I run VPC with '-usehostcache' all the time, for Windows Guests as well as 'Other' OSes? Will the Windows Guests run slower then, or will the VPC just 'waste' some more RAM?
Tuesday, February 01, 2005 2:23 AM by SvOlli

# re: Enabling host disk cache under Virtual PC

Any options for using this for Virtual Server 05?

Most of my Virtual machines are NT based (NT/2K/XP/2K3) but occasionally I need to fire up a linux VM for testing stuff.
Tuesday, February 01, 2005 8:49 AM by Robert Aitchison

# re: Enabling host disk cache under Virtual PC

Also, how can I tell that '-usehostcache' is actually running?

Or do I just pull out my stopwatch and look for a performance gain... ;0)
Tuesday, February 01, 2005 9:55 AM by VPC User

# re: Enabling host disk cache under Virtual PC

Denny - there is no way to enable this other than by the commandline

SvOlli - No it will not hurt performance at all, but if you experience a catastrophic host failure there is an increased chance of data loss

Robert - No there is no way to enable this on Virtual Server

VPC User - Unfortunately this is pretty much the only commandline parameter that Virtual PC has for which there is no easy way to tell if it is enabled or not

Cheers,
Ben
Tuesday, February 01, 2005 3:44 PM by Virtual PC Guy

# re: Enabling host disk cache under Virtual PC

By 'not architecturally correct' behaviour I presume you mean it doesn't honour direct-to-disk requests (Forced Unit Access) nor presumably ordering of writes. This means that NTFS transaction logging could be inaccurate if the host system fails, leaving the guest disk in an unrecoverable state. Well, you might get it back with chkdsk.

I wouldn't advise enabling the option on any other OS that features a journalled filesystem, either. That includes most current Linux distributions if you've selected ext3, Reiser, XFS or JFS as the filesystem.
Thursday, February 03, 2005 8:52 AM by Mike Dimmick
New Comments to this post are disabled
 
Page view tracker