2

I am doing performance tweaking of a simple app that uses MVC on IIS 7.5. I have a StopWatch starting up in Application_BeginRequest and I take a snapshot at Controller.OnActionExecuting.

So I measure the time spend in the entire IIS pipeline: from request receipt to the moment execution finally gets to my controller.

I obtain 700 microseconds on my 3GHz quad-core (project compiled Release x64), and I wonder where the bottleneck is, especially hearing some people say that one can get up to 8000 page loads per second with MVC.

How can I optimize MVC and IIS pipeline to obtain higher speed?

Community
  • 1
  • 1
Andy
  • 2,670
  • 3
  • 30
  • 49
  • You should change the question to "How can I optimize MVC and IIS pipeline to obtain higher speed?". The current title question is a completely different question, and has more to do with specifying perf requirements. – Merlyn Morgan-Graham Feb 23 '10 at 19:25

4 Answers4

4

The tool "IIS Tuner" may be helpful. It is an open source tool and you may investigate the tricks that application made. the tool is available at codeplex

Zuuum
  • 1,495
  • 11
  • 18
2

I obtain 700 microseconds on my 3GHz quad-core (project compiled Release x64), and I wonder where the bottleneck is, especially hearing some people say that one can get up to 8000 page loads per second with MVC.

Note that a result of 700 µs in the pipeline is not incompatible with getting throughput of 8,000 requests per second. (You may be confusing response time with throughput.) If 8,000 people simultaneously made requests and each one was fulfilled less than one second later, that would be 8,000 requests per second regardless of whether the response time was 1 µs, 700 µs, or 700 ms.

Is 700 microseconds too long for IIS+MVC pipeline to run on every page load?

Not necessarily. You'd have to evaluate whether or not you're actually getting saturated with requests.

John Feminella
  • 303,634
  • 46
  • 339
  • 357
1

The tool "IIS Tuner" may be helpful. And makes WCAT not works. Any views?

more details as below, D:\Program Files\IIS Resources\WCAT Client>wcclient.exe localhost

wcclient.exe 5.2.3652 - Web Capacity Analysis Toolkit Client.

Copyright (c) 1995-2002 Microsoft Corporation. All rights reserved. Compiled May 29 2003, 16:28:20 Connecting main client thread... Connected. Waiting for Config Message: Connecting Dead controller thread... Done. IP version requested for testing is unspecified Receiving script header message: Done. Receiving string table: Receiving 1 script pages ... Fail to resolve server address for IP supported by the client: localhost Connecting client abort notification... Failed to resolve server address(es).

jihe.wei
  • 11
  • 2
0

Have you looked into: - async controllers? ASP.NET processes are limited to 12 threads (or 12 threads per CPU) not sure which. - there are a bunch of micro-optmization tricks (for example, MVC loads all the view engines...when you only need Razor remove the others)

So, there are definitely ways to improve performance and you have full control over the HTML in MVC as well (no viewstate, obstrusive markup, unecessary postbacks etc)

Bart Czernicki
  • 3,663
  • 1
  • 21
  • 19