Recently I've spoken to a friend who told me of an idea to improve performance of a website (as well as increasing the use of full capacity of a machine) by installing multiple virtual machines on the same machine (MS IIS web server) and then mirroring the website on those virtual machines while keeping the original entry page on the local IIS. I am not sure if this is possible and if yes can anyone point me to some articles on this issue?

link|improve this question
feedback

2 Answers

regardless of whether it's possible or not (I'm sure it is - that's what VMs are for), what makes you think that adding the overhead of running extra virtual machines (not to mention disk contention as the VMs fight to access different copies of the same files) will somehow be faster than just the one main server?

people usually do what you're talking about (load balancing) with multiple real, physical machines - each one having its own CPU(s) and RAM, as well as disk and network bandwidth. doing it on VMs would defeat the purpose of that.

VMs generally come at a, usually small, performance penalty to bare metal.

the advantages of VMs is that they allow you to consolidate several physical machines into one bigger one (saving money and power) AND that you can get a nice degree of isolation from one VM to another (good for security and to prevent one berserk process from taking down everything else). they're also good for experimentation and trying out new/changed things before implementing them for real. and being able to take a snapshot of a VM just before you upgrade it is also useful. and so on. the uses and benefits of VMs are many, but improving performance isn't one of them.

link|improve this answer
Thank you for your response. As I said, my friend made me think that... The thing is he thought, that as the max number of worker threads in an application is [set_number] x [number_of_CPUs], that if you increased the number of virtual machines on a server you would increase the number of available threads all together... I wasn't sure if this is true, so I came here to ask you :) Thanks! – noob-foreva May 1 '11 at 15:38
it might be true (i'm no expert on IIS), but web serving isn't usually CPU-bound, it tends to be I/O bound - and by adding multiple VMs you're increasing the I/O demands without increasing the I/O bandwidth. not likely to result in a performance improvement - more likely the opposite, you'll just have more threads waiting for I/O rather than doing any useful work. the only way to know for sure with your site is to set up a test machine (as similar to the real machine as possible) and benchmark it w/ bare-metal vs multiple VMs. i doubt if it would be worth the effort. – Craig Sanders May 1 '11 at 22:03
feedback

If you have a server tuned correctly (caching, compression, etc.), there should not be a need to start creating VMs on your host machine. As was mentioned above, the overhead of creating the VMs could actually end up degrading the performance of your site.

If you are looking to increase the number of threads processing your site, you could look at setting up a web garden within IIS which increases the number of worker processes assigned to the app pool. Setting the 'Maximum Worker Processes' of an app pool to anything other than 1 is a web garden. Web gardens are not suitable for all applications and can cause trouble if you are handling user sessions (each worker process maintains its own memory space). Session data would have to be maintained in an external location. Static HTML sites work well within a web garden.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.