Visual Studio: significant performance difference on VMware Fusion vs Bootcamp?
Solution 1:
I know this question does not explicitly mention Parallels, but maybe some of my settings/experience there will be transferable to settings with VMWare Fusion. I am running a MacBook Pro running on OS X 10.7.3 with an Intel Core i7 2.2GHz and 8 GB 1333 MHz DDR3 memory for my RAM. The version of Parallels I am using is Parallels 7.
Some important notes before I go into my configuration:
I am a developer with MSDN access. Under my MSDN account, I have access to Office 2010 including the Mac version (I mention this as, in many cases, Office will be a necessity and therefore an important consideration - while I could install both, there's also the cost in disk space). This also meant that cost was less of a concern here as I had access to everything I needed via MSDN.
One other thing I should note is that I would not recommend converting a VMWare virtual machine to a Parallels virtual machine as I experienced several issues with this and ended up doing a clean install.
- I am developing on both my Mac (via Eclipse and Aptana) and Windows 7 VM (via Visual Studio)
So after about 1 month of configuring my VM, I've come down to a pretty nice configuration where I am experiencing very smooth performance. I have been very happy with this configuration and it's quite convenient over the alternative of rebooting to get to my Windows machine. Below I will address the Parallels settings that I feel have made this successful in addition to the software I am using on the VM, some important items regarding Windows 7 settings and a $1 program I would suggest every Mac owner would benefit from (but really a necessity for anyone using a VM on a Mac):
VM software:
- Windows 7 Ultimate x64
- Visual Studio 2010 Premium w/ plenty of Add-ins such as ReSharper, Mindscape Workbench, NuGet, etc...
- SQL Server 2008 R2
- Expression Blend 4
- Daemon Tools
- Charles Proxy (I would highly recommend this over, or at least in addition to, Fiddler if you are going to be developing on both your Mac and PC - opt-in feature for SSL debugging is very nice - I had to install on both my VM and Mac ... 127.0.0.1 does not resolve to the same place on my Mac and VM)
- IMPORTANT - I have ensured that no services are running at startup via Start->Run-> 'msconfig' - I tend to like using databases like MongoDB and Neo4j and I usually run them as services as this is generally how I will use these databases in production so this could potentially be a bit of a pain to manage if I end up running these on my Windows box (depending on the production settings I'm trying to emulate)
VM settings:
General
- CPUs: 4 (out of 8)
- Memory: 3072 MB (out of 8 GB)
Options
Optimization
- Performance: Faster Mac (this may not be intuitive, but I've found it has helped eliminate bottlenecks that result in a noisy system and potential overheating issues)
- Enable Adaptive Hypervisor: true
- Tune Windows for speed: true
- Power: Longer battery life (otherwise I run into overheating issues)
-
Free Space: Automatically compress virtual hard disks: true (this hasn't caused any performance issues for me, so I have kept this on)
Security
-
All options set to false, Encryption is not on, Undo Disks is set to Disable
Applications
- Pause Windows when no applications are open: true
- Web Pages: Open in mac
-
Email: Open in mac
Coherence
- Use Crystal Mode: true
- Show Windows notification area in menu bar: false
- Allow applications to switch to full screen: true
-
Disable Windows Aero: false (you'll get better performance if you disable this, I'm just a very visual person and decided I like to keep Aero on in Coherence mode)
Full Screen
-
Use Mac OS X Full Screen: true
Advanced
SmartMouse: Auto
Hardware
Video
- Video Memory: 512 MB (out of 1 GB)
- Enable 3D acceleration: true
- Enable vertical synchronization: true
Mac Software
- Free Memory Pro: Macs have been known to do a terrible job at managing unclaimed memory. At some points I am running my VM (automatically takes up 3 GB with my config so long as an application is running), two instances of Eclipse (different configurations), Aptana, several browser sessions, several terminal sessions, my VPN and my Office applications. At this point my memory may be running around 50-200 mb - I've found if I use Free Memory Pro to clear up my memory once or twice per day that my Mac still runs without ANY excessive noise or heat and stays around 1.2 GB of free memory even with all the above mentioned applications being open :) IMHO, Macs should come with this program for free, but the next time you're on a late night trip to Wendy's...just forgo one of those $1 menu 5 piece nuggets and buy this program instead - it's totally worth it
Solution 2:
I've used a Win7 virtual machine on VMware Fusion 3.0, on both a Mac Pro and a MacBook Pro. I haven't had any performance problems, the virtual machine performance on both systems was very good. I had the best results with Win7 when I configured the virtual machine to have 1 GB of RAM. (Full disclosure: I work on VMware Fusion.)
I haven't personally tried to run Visual Studio in a VM but people who have done so have told me that, as long as the source code you are compiling is stored on the virtual hard disk, build times are good, although they are slightly slower than native performance.
I have heard that storing the code on a "network" drive (either an HGFS share or an NFS/CIFS share on the host, accessed via a virtual ethernet device) is a bad idea. Apparently the build performance is pretty bad in this configuration.
Hope this helps!
Jason
Solution 3:
I convinced my work a while back to get me a Mac Pro instead of the intended, comparable, Lenovo (they bought in on the whole idea because it ended up being about $800.00 cheaper, macs aren't always the most expensive :) )
I'd been using Fusion over Parallels, due to my original experience with the early versions. I have a Windows 7 x64 VM that I use for Visual Studio, and offload everything else that I can to the OS X. It had been working great. VS2008 loaded up quick, builds where quick etc. etc.
Lately I've been using VS2010 and I've noticed a significant performance hit. I decided to give Parallels another go due to all of the latest reviews about performance with version 5. Both Parallels and Fusion work great, but there is a very noticeable performance difference with VS2010 on Parallels vs Fusion.
So to your original question I think you'd be good just virtualizing Windows for development, if you can offload much of your other work onto OS X. Performance has come a long way with Fusion/Parallels and it's a pain to continually reboot to switch your OS for the performance bump. If you're using VS2010 I might recommend Parallels right now simply because of slowdown you get with Fusion. (I think this may be related to VS2010 using WPF which may be faster inside Parallels)
Solution 4:
I've done both, using Win7 betas, and ultimately preferred using Boot Camp. Admittedly, this is on a 13" MacBook Aluminum (the model issued late in 2008) with 2GB of RAM.
VMWare performance was quite good, and very impressive, but because my dev stack didn't have full reign of the machine, it felt just pokey enough to annoy me. (Understand that my dev stack was a touch more than VS -- I had VS, SQL Express, CruiseControl.NET, etc.)
I felt the performance under Boot Camp was considerably better -- but this is to be expected, as you're talking about native performance. Boot Camp reboots you into Windows, whereupon Windows is the only OS running, and has full access to the machine.
Naturally, your mileage may vary, and performance is much more in the "feel" than the metrics. You may find VM performance perfectly dandy. You may find it a bit pokey. You may find that it's good enough given that it doesn't require a full reboot and you can still run your Mac apps alongside the Windows environment. You may prefer the reboot method. Only you can make the final trade-off determination.