2

I was just wondering what will have the best performance.

Lets say we have 3 physical servers, where each server has 32cores and 64gb ram, and the application is a "standard" asp.net application. Load balancing is already in place.

Setup 1# - One applicaiton consumes all - One IIS server with 1 application running on each physical server. (total of 3 application "endpoints")

Setup 2# - Shared resources - One IIS server with 16 applications in a webfarm. (total of 48 application "endpoints")

Setup 3# - Virtualization Virtualization: 15 virtual servers (total of 45 application endpoints)

What would have the best performance, and why?

ravndal
  • 225
  • 1
  • 7
  • Is the application more CPU bound or IO bound? I guess it will be IO bound as that what web apps are usually do – Ankur Oct 21 '11 at 08:38

2 Answers2

3

It depends! Much depends on what the application is doing and where it spends its time.

In broad terms, though:

If an application is compute-bound -- i.e. the time taken to retrieve data from an external source such as a database is limited -- then in most cases setup #1 will likely be fastest. IIS is itself highly multi-threaded and giving it control of the machine's resources will allow it to self-tune.

If the application is data-bound -- i.e. more than (say) 40% of the time taken for each request is spent getting and waiting for data -- then setup #2 may be better. This is especially the case for less-well-written applications that do synchronous in-process databases accesses: even if a thread is sitting around waiting for database access to complete it's still consuming resources.

As discussed here: How to increase thread-pool threads on IIS 7.0 you'll run out of thread pool threads eventually. However, as discussed on MSDN here: http://blogs.msdn.com/b/david.wang/archive/2006/03/14/thoughts-on-application-pools-running-out-of-threads.aspx by creating multiple IIS worker processes you're really just papering over the cracks of larger underlying issues.

Unless there's other reasons -- such as manageability -- I'd not recommend setup #3 as the overhead of managing additional operating systems in entire virtual machines is quite considerable.

So: monitor your system, use something like the MiniProfiler (http://code.google.com/p/mvc-mini-profiler/) to figure out where the issues in the code lie, and use asynchronous non-blocking calls whenever you can.

Community
  • 1
  • 1
Jeremy McGee
  • 24,842
  • 10
  • 63
  • 95
1

It really depends on your application, you have to design for each architecture and performance test your setups. Some applications will run fast on setup 1 and not on the other setups and the other way around. There are many more things you can optimize on performance in iis. The key thing is you design you application for monitoring and scaling.

Peter
  • 27,590
  • 8
  • 64
  • 84