From: Sophie (...@ctechemail.com)

Hi,

I noticed you've shared TrueCrypt on this page, as you may be aware, development of TrueCrypt was discontinued back in 2014 and has subsequently not been maintained. A number of security flaws have been uncovered and as a result we are reaching out to people to highlight a list of alternatives.

Here's the list (along with further details about TrueCrypt no longer being maintained) - https://www.comparitech.com/blog/information-security/truecrypt-is-discoutinued-try-these-free-alternatives/, when you update your page it could be a useful resource to point your visitors to.

 
Categories
Africa (65) ASP.NET (455) Bugs (161) CodeRush (21) Coding4Fun (35) Corillian (24) DasBlog (117) DevDays (5) Diabetes (49) eFinance (11) Gaming (103) HttpHandler (15) HttpModule (20) Identity (2) INETA (8) Internationalization (35) Javascript (56) Learning .NET (40) Longhorn (9) Movies (44) Musings (306) Nant (37) NCover (11) NDC (11) NDoc (6) NUnit (44) PDC (55) Podcast (61) PowerShell (48) Programming (103) Reviews (95) Ruby (47) Speaking (157) Subversion (14) TechEd (119) Tools (339) ViewState (19) Watir (21) Web Services (421) XML (272) XmlSerializer (27) Zenzo (35)


 Thursday, March 01, 2007
« Webinar: Online Banking 2.0 | Main | Hanselminutes Podcast 53 - Hiring and In... »

Virtual PC Tips and Hardware Assisted Virtualization

I posted a list of tips on Optimizing Performance on Virtual PC a while back, and I'm a big fan of Invirtus VM OptimizerJeff prefers to do the optimizations himself, but the time saved is worth the $70 for a tool like this. With the new Orcas March CTP available as a VM and weighing in at 9 gigs, I need to save all the time I can. Frankly, anything I can do to squeeze performance out of a VM is a good thing.

Be sure to check out Tim Sneath's VM Museum - that's where I snarfed the Windows 3.1 VPC picture.

  • I always run my VMs on a different spindle:
    • I swear by the WDC My Book drives, I've got two at work that we run VMs on and one at home.
  • At work, because we're in banking, virtually EVERYTHING is encrypted. If it's not chained down, it's either encrypted, or encrypting. I use TrueCrypt at the Partition-level with AES on my 500gig drives - the ones I run my VMs on, and you'd think it'd cramp my style, but it's actually not all that bad.
  • I run VM Optimizer (the automated version) on all my drives.
  • I have 4 gigs of RAM on one machine, and 2 gigs on the other...I tend to dedicate between 512M and 768M to my VMs.
  • I run my VMs without swap files if I have dedicated enough RAM to them. 
  • I always make sure my VM is running the latest version of the Virtual PC Additions.
  • I turn off features I don't need in the VM. Sound and USB support are often the first to go.

I run both Virtual PC and Virtual Server on my work machine. Why, you ask? Here's my reasoning, from a very good paper comparing Virtual PC and Virtual Server.

  • Host multiprocessor support. Virtual Server scales across multiple processors on the host computer—up to 32. Each running virtual machine can take advantage of up to one CPU. For example, on a 32-processor host computer, you could allocate your CPU capacity so that 31 simultaneously running virtual machines would each use up to one CPU, leaving a CPU free for the host operating system.
  • Multithreading. Virtual Server 2005 is a multithreaded application that runs as a system service, with each virtual machine running in its own thread of execution. In contrast, Virtual PC is a single-threaded application in which all simultaneously running virtual machines run on the same processor.
  • Virtual networking. With Virtual Server, you can create an unlimited number of virtual networks, each with its own virtual Dynamic Host Configuration Protocol (DHCP) server. You can also configure Domain Name System (DNS) and Windows Internet Name Service (WINS) servers, Internet Protocol (IP) addresses, and IP address lease time.

Since I've got a Core Duo machine, this made sense to me. I can dedicate (mostly) a VM to one processor, or more importantly, I can run multiple VMs (often done when doing large demos) and get better performance. When running multiple VMs as a group, you can get better performance by using separate external disks for each VM, and ensuring, if they are USB2, that each disk has its own dedicated USB2 "Root Hub." Avoid during concurrent disk access with two drives on the same USB root hub.

Another interesting feature in both Virtual Server 2005 R2 and Virtual PC 2007 is Hardware Assisted Virtualization or VT Technology. You'll need to turn it on in both apps (Here's how to turn on Hardware Virtualization in Virtual Server).

Note the check box. Here's the trick, though. You not only have to have a CPU that supports this - nearly all newer Intels and AMDs - but often you have to turn it on in the BIOs. My IBM T60 and T60p had this turned OFF by default. Another thing to note is that it's often turned off again after BIOs upgrades. I'm not sure why that is, as it seems harmless, but either way, be aware.

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 .

Here's some more details about VT from Intel. Since Operating Systems, by their nature and definition, don't expect to have to share physical resources, they tend to get pissy when asked to. Hardware Virtualization moves a bunch of the "platform management" computational tasks off to the hardware, removing a layer of abstraction. Without hardware help, lots of CPU state information is stored in memory, while with virtualization, it's stored in memory that's dedicated. In a data-center or hosted virtual environment that means that you can't take down the whole "Virtual Farm" by taking down the one VM.

So, now the real question is, does Hardware Virtualization actually make things faster?

Yes, of course it does. But for Windows VMs, it's not like "night and day" different. It's not twice as fast, which some folks feel it should, mostly based on the words "Hardware Assisted" and fueled by past pain of running within a slow VM.

Both Virtual PC Guy and John Howard have done some analysis in this area. Before we get to the nitty gritty, let's just drink in these paragraphs from Virtual PC Guy (emphasis mine):

Now - in order to provide improved performance, our Virtual Machine Additions will (on Windows virtual machines) make appropriate changes to the guest operating system such that we can run the virtual machines kernel mode code directly on the processor too (please note that there are some major simplifications in the above statements).

Hardware virtualization support allows us to run all of the virtual machine code directly on the processor in virtualized mode (with a few edge case exceptions).  So getting back to the original question - what does this all mean for Virtual Server?

Well the first interesting point to make is that it does not make much difference for people running Windows virtual machines with the Virtual Machine Additions installed.  As I mentioned we had already managed to get these virtual machines running almost entirely virtualized (from a processor perspective). 

Basically, this jibes with what I found. It's faster, but it's not like WOW faster when running a tuned VM that has Virtual PC Additions - which is what you should be doing anyway. (Some folks haven't discovered those Additions...make sure you've installed them.)

That said, John did an install of Windows Server 2003 on two VMs, on with hardware virtualization and one without:

Step With Hardware
Assistance
(Seconds)
Without Hardware
Assistance
(Seconds)
Improvement
(Seconds/%)
1: Text Mode Install 236 334 98s=29%
2: Initial GUI Install 167 287 120s=42%
3: GUI Install Completion 733 985 252=26%
4: Boot with additions 10 14 4=29%
 * From John Howard's Blog

He's got some nice charts to check out as well.

From my point of view, check a box, get 10-30% performance improvement. Seems good to me.

Visit the Dream.In.Code Programming Forums

Reviews | Tools
3/1/2007 5:06 PM by Scott # Comments [6] | View reactions | 

Friday, March 02, 2007 8:06:05 AM (Pacific Standard Time, UTC-08:00)
Off topic, but there is a minor bug in dasBlog's Remember Me feature for comments.

While posting comment, enter "Željko" at "Name" text field and check checkbox "Remember Me". Next time you want to make a comment at that blog there is "Željko" in "Name" text field. Of course, it should be "Željko".
Friday, March 02, 2007 8:22:17 AM (Pacific Standard Time, UTC-08:00)
There is a free tool that will check if you have hardware virtualization and is it disabled.

http://www.grc.com/securable.htm
Friday, March 02, 2007 1:00:23 PM (Pacific Standard Time, UTC-08:00)
Thanks for the details in this post.

I would like to add that beyond the CPU the speed of the hard drive will dramatically impact the performance. I wrote a bit about how a FireWire 800 externally attached drive will do better than USB2 because USB will not maintain a sustained speed like Firewire.

http://brennan.offwhite.net/blog/2006/01/04/performance-of-firewire-vs-usb-2-for-virtual-machines/

This is often overlooked. I have more on this here...

http://brennan.offwhite.net/blog/2006/11/08/best-way-to-boost-developer-productivity/

I also make sure my hard drives for hosting VPC images is 7200rpm with 16mb of cache which performs well. Now I just have to see if I can boot my Inspiron to the BIOS screen to enable hardware enabled virtualization. I would like to squeeze a little more performance out of my VPC.
Friday, March 02, 2007 1:09:09 PM (Pacific Standard Time, UTC-08:00)
One note for people building a new machine - the new Allendale Core 2 Duo processors (E4300 and upcoming E4400) don't support VT, so go with the Conroe (E6x00) processors if that's needed.
MarkW
Saturday, March 10, 2007 12:25:49 AM (Pacific Standard Time, UTC-08:00)
If you have multiple VM's running then it is useful to spread the I/O and CPU intensive applications onto multiple VM's.
This is because a single VM that is running I/O intensive app and a CPU intensive app will run better than two VM's, one with an I/O intensive app and the other with a CPU intensive app. In short, it is better to have your web server and database on the same VM and then have another web server and database on anohter VM. That way you are utilizing all the resources of each VM rather than just the I/O of one VM and the CPU cycles of the other one.

See technet for more:

http://technet2.microsoft.com/WindowsServer/en/library/bcc5e200-88af-4a64-963b-55f1efb251d11033.mspx?mfr=true
Monday, March 12, 2007 10:05:48 AM (Pacific Daylight Time, UTC-07:00)
Have you been able to run latest Virtual Server on a Vista machine?
Pete Tanner
Name
E-mail
(will show your gravatar icon)
Home page

Comment (Some html is allowed: a@href@title, b, blockquote@cite, em, i, strike, strong, sub, super, u)

© Copyright 2007 Scott Hanselman newtelligence dasBlog 1.9.6315.0
Page rendered at Thursday, March 22, 2007 5:09:40 PM (Pacific Daylight Time, UTC-07:00)
 
Contact me: =scott.hanselman