Partager via


Arrghh, why does Virtual PC technology exist in the first place?

LOL, I reckon that a blog post title like this is sure to attract your attention to read this. My apologies, this blog post is not about condemning Virtual PC technology. I love to use VPCs! I run VPCs everyday.

If you are a regular user of VPCs, I bet it crosses your mind as to why VPC instances run so sluggishly that you start to curse at the technology itself. Why does it even exist in the first place?

Let's not debate that, we all know that VPCs have its own advantages. To me, it helps to emulate an OS environment that I do not own, or that it emulates a particular software environment which I do not wish to install in my host OS, among others. Being a regular user of VPCs, I would like to share with you my experience using VPCs, hopefully it helps you too.

Here are my 5 cents ( taking into consideration the rounding mechanism exercise which takes effect in Malaysia starting 1 April, 2008. To represent some value to my blog readers, I choose to round up instead):

VPC instances can be optimized a number of ways

1. Have a processor that supports hardware virtualization. It does matter! See the diagram below:

clip_image002

2. As you could see, there's an option in the VPC settings that allows hardware-assisted virtualization if your processor supports it. Unfortunately, in my case even my notebook PC does not support that. My processor configuration is as follows:

clip_image004

According to Scott's blog, and I quote him:

If you're running Intel, refer to this table at Intel to see if your chip supports VT . All the Core Duos support VT except the ones that end in "E" like the Intel Core Duo processor T2300E .

3. In no particular order, you should check the Intel Virtualization Technology (VT) web site to find out what processor supports hardware-assisted virtualization, also known as "Virtualization Inside" (cool name). Also check out AMD virtualization technology. I do not take sides, as I have processors from both AMD and Intel.

4. My home PC has an AMD Athlon 64 X2 Dual-Core processor and it supports hardware-assisted  virtualization. Whenever I am preparing my demo on a VPC image, I work from home (a valid reason to my boss that I have to work from home)

5. Memory allocation: In the above VPC instance, I had 1.6GB of memory allocated to my VPC instance. In my home PC, I allocate 2GB, or more if I do not run many applications in the background. Size does matter.

6. Do not run your VPC on the same hard disk as your host OS. Run your VPC on an external HDD that has a high RPM speed. Or if you PC has two separate physical HDDs, run and store your VPC on the HDD that is not where your host OS is installed. I am using an external Maxtor HDD with an external power source. Do not use those tiny 2.5" pocket HDD that draws power from another USB port. The power from another USB port is not enough to juice it up, besides most likely the RPM speed of the pocket HDD is low.

7. I compress the folder which contains my VPC image. The reason behind this is not just because I want to optimize my storage space, but even more importantly is the fact that I want to reduce the amount of disk reads from the HDD. It's better to let my CPU work hard rather than my HDD work hard. Everyone knows that the weakest link in terms of the performance of a PC is the HDD.

8. This is how I compress the folder, right-mouse click on the folder and choose Properties:

clip_image006

9. You should also compact your VPC image (I don't do this as often as I should though). Here's how:

clip_image008

10. If you are running your VPC on Windows Server 2003, for instance, use Microsoft Virtual Server 2005 R2 instead.

If you want to read more about VPC optimization, you may check out the following blogs:

Scott Hanselman

The Virtual PC Guy

Have fun! Tomorrow I will be presenting a session called "Defy occasionally connected challenges with smart client applications that shine" (*phew* yes I admit it is a mouthful), and practicing what I've just mentioned, LIVE, at

image

clip_image002[6]

See you there!

If you're an ISV in Malaysia and your application is affected by the rounding mechanism exercise, I will have a few suggestions of my own in a follow-up blog post.

Comments