Reducing Netflix Stutter in Windows Virtual Machine
I've been a long-time user of Unbuntu, abandoning Windows on hardware some time ago. I swap between VMWare and VirtualBox to run Windows for occasions where I must, since I can do just about everything native on the Ubuntu desktop.
I've got a little bit of horsepower in this system, an AMD Phenom 6-core processor, 8GB of RAM, and an NVidia 8800 video card attached to a pair of monitors (primary 24-inch running 1920x1200, and secondary 20-inch running 1680x1050).
I've mostly been using Windows for testing web sites in Windows browsers, and admittedly for Netflix streaming. For the former, running in a VM with no measurable performance impact, and for a long time even the latter was barely noticeable.
I recently made a switch to Windows 7 (from XP) and noticed that Netflix got a lot more stutter. I've given my VM 3GB of RAM (when running it rarely breaks 2GB used) and 2-cores (tried with both 1 and 2 thinking maybe Windows SMP overhead was to blame), and I've tried with and without 2D and 3D acceleration enabled. My BIOS is configured to allow full virtualization, so the VM should be running as close to iron as allowed.
I've also turned off the eye-candy in the VM, and tested with the eye-candy off or reduced in Ubuntu (I like the wobbly windows and true transparent terminals), but neither of those seemed to make much of an impact as I tend to run my Netflix video "full screen" in a VM window sized for acceptable performance, and then leave it alone.
I also noticed that the Virtual Box virtual hard drive icon was constantly fluttering and my HDD was constantly churning. I suspected a heavy impact on performance may have to do with my choice of a dynamically sized HDD (machine has a pair of TB drives, and I've told Windows to take only 100GB (and it's only using about 20GB), and I use shared folders for real work and storage. I thought to make a quick change to my system, assigning the TEMP and TMP environment variables and setting my IE temporary file folder to folders on the shared drive. This dropped the HDD activity significantly, and reduced the stutter almost significantly.
I'm unsure if there's other places that could be configured to direct caching off the Windows C drive and onto the shared folder. I've also not tried making a static-sized VM virtual disk to see if that would help. I suspect there will always be a performance hit since you'd always be writing files inside another file. If I had thought ahead I may have been able to leave (or add) a physical partition so the VM would have raw hard drive access, but the shared folder does a fair job. It still suffers a little "network" latency, but it's better than file-in-file access of writing the temp files in the virtual disk.
I mostly blame the new Windows version (and kick myself for migrating and removing my XP VM) as the performance was better on the same physical hardware, in a similarly configured VM, but with the older OS and its related software.
A little follow-up.
There may have been a little blame to go to the PC. I did put this on the hex-core, which it turns out had a conflict between the BIOS and Linux kernel trying to manage the CPU speed. Making a change in the BIOS setting, to allow the OS to control the “Cool-n-Quiet” reduced much of the stutter, and did quite a bit to separate the processing on each core.