Wednesday, March 19, 2008

Mac: VMWare Fusion and Visual Studio 2008 Express Edition

I'm traveling right now and don't have access to all of my normal development tools but since I do have my handy MacBook I figured I would try a little experiment. Here's what I have set up right now:

Windows XP SP2, fully patched

I allocated 1GB of RAM to the VM for Windows XP and it worked great - plenty of headroom to run applications. I've said it before but it bears repeating since I know based on the comments that a few people that are Windows folks are considering trying out a Mac:

Windows runs really well, even on my lowly little MacBook. I did bump my memory up to 4GB, which I think is really important, but standard Windows applications (not games mind you - not even attempting that on a MacBook) work great.

To maximize screen real estate - really important on a MacBook - I run Windows XP in full screen mode. This still allows me to access spaces easily. 

I was able to get Visual Studio 2008 Express installed without any problems. Early in the setup VS08 rebuilds much of it's library, so it's a chance to see the impact it has while running full bore. On my machine during peak compile times the CPU ran a steady 50% utilization. I jumped into other Mac applications, including Safari while it was working and experienced no noticeable degradation in performance.

Once I had VS08 up and running it ran really smoothly. I didn't stress it too much - just a couple of browser based applications - but it was able to load them up in IE and I could run through the debugger just fine. During these minimal tests the CPU barely broke a sweat.

To give you a sense of what's possible to run on a little MacBook, here I am using Spaces to run NetNewsWire, iTunes, iChat, Safari and finally a full screen Windows XP (lower right) with Visual Studio 2008 Express Edition loaded and running.

What's great about this is that I can rapidly switch between environments. Windows performance - even in a VM - is snappy. I notice a little window "tearing" when dragging windows quickly. I think that's probably a function of the way graphics are handled on a MacBook - no dedicated video card. The MacBook Pro does have a dedicated video card so it may not have this issue.

One thing I have noticed with the MacBook is that I do take a pretty decent CPU hit when viewing flash based sites. It's not nearly as bad with QuickTime video (interesting, huh?). When I speak to friends that have iMacs or Mac Pros they don't see any CPU hit when watching Flash based stuff.

Based on the results I've had I think I'm going to try loading up VS05 with my current product build into a VM and see what the performance is like. My project has gotten pretty large and uses some aftermarket controls for UI, so it will be a good test. I also am debugging my application using SQL Server Compact Edition so it's a pretty tall order.

On my Windows XP development box - a beast of a machine with an EVGA 680i mobo, Intel QX6700 processor, EVGA 8800GTX video and matched Corsair memory I take a significant CPU hit when VS05 decides to refactor my code while using certain design surfaces. 

I have no doubt the MacBook will also strain under that burden but it will be interesting to see if it is still useable when that happens.

10 comments:

Sean said...

I really enjoyed this. I am a student who plans on developing for a living and I currently do all of my development on my PC which has similar specs to yours. I didn't have the time to load VS05 onto my Macbook if it was not going to respond properly. I was already too aware of the issues that Visual Studio can present on PC's, let alone in a virtual session on a Macbook.

My Macbook only has 1 Gb of memory still, so it would be lacking in that department. I will try this out and let you know how it goes.

Robert Mills said...

I have been waiting for a post along these lines. I am a student also and I live developing in VS. I have always been interested in just trying a Mac but was concerned about not being able to use VS. Ever since I saw your blog post from Digg, I have been more and more convinced that it's easy to do and you get lots of flexibility. Hoping in the coming weeks I will have the money together to go ahead with a purchase.

David Alison said...

@sean: I would highly recommend that you bump that memory up to 4GB. It's really cheap now and very easy to do.

@robert: If you can pull it off a MacBook Pro will run a little cooler since the CPU is not hit nearly as hard, though with 4GB of memory a MacBook is very capable.

Charles said...

Hi David, like many reading your blog, i stumbled across it on digg, and have read all of your posts so far. For the first time i have started to use rss to keep track of your entries..... In regards to Fusion/parrallels, i'm interested that you allocated memory to the application.... in my experience, i have read (about parallels) that it was best not to change the default allocation, as dynamic memory addressing would automatically provide memory when needed.... not sure if you have, but this could be worth a look into. I've just checked VmWare's site but couldn't find anything definitive for you.

In regards to virtualisation you seem hesitant that everything should work well..... Don't forget that there is no emulation going on here, the software is calling the hardware near directly, so you should only see a small loss of power at worst case (3% or so). I've done alot of testing using 3D software through parralels/VMWare and the sped is just incredible.. no noticeable hits in speed at all. As you are suggesting you are going to do... Try and break it !!! by throwing everything you've got at it.....
Enjoy the macbook !!! Cheers, Charlie.

David Alison said...

@charles: I'm not sure if VMWare dynamically allocates the memory for Windows - pretty sure it doesn't. On boot Windows establishes the memory available to it. If you look at Task Manager it will tell you how much memory is available to Windows - and it's pretty much what I defined inside of Fusion.

My biggest concern with running Visual Studio in a VM is the way VS creates an internal web server for debugging. I'm a little concerned with how port management will work; my knowledge of TCP/IP ports and usage is rudimentary - hence my need to prove it to myself that it will be OK.

Thanks for the comments on the blog - glad you are enjoying it!

Si-man said...

Hi another great article.

I also switched to VMware (tried parallels but it was unreliable) mid last year. I have VM sets for each client often I run 5 or more VM's at any one time. I also started off with MACBook as my first steps after 25 years of PC's.. now progressed onto a MAC Pro!

One downside I found was that switching between OS X and XP all day meant that I was always getting the keyboard short cuts wrong, I now use autohotkey on the VM's to remap the cntrl key and doublecommand on the MAC so I can do cntrl-C/V/Z etc where ever I am :-)

I also find it great that I can copy a VM over to a another machine to take home or to hand the whole project to another developer is really easy.

For me the move to MAC and VMWare gave me portability, reliable hardware, loads of ram and touch of style ... at last!

David Alison said...

@si-man: I would really like to get a Mac Pro to effectively replace the Windows XP machine but I've got a little too much on my plate at the moment. Hopefully soon though. I can only imagine what a Quad core system could do; I'm already getting excellent performance from a little MacBook.

Gary Lacey said...

fusion has been bogging my machine down and my blackberry wont sync. anyone try out parallels? my prof swears by it

Eric said...

Hi David,

Interesting post. I am trying to do the same thing you are and was wondering how much RAM you allocated for your virtual WinXP instance in VMWare Fusion? 1GB, 2GB? And did you mess around at all with the virtual memory/page file settings inside the guest WinXP instance?

David Alison said...

@Eric: I am now dedicating 2GB of RAM to the instance and on the Mac Pro I've added in access to a second processor. I never played with the settings inside the Windows XP instance, though I didn't really feel the need to either.