IIS express requests take 4 times longer to execute [Answered]RSS

11 replies

Last post Nov 05, 2011 11:12 AM by kobruleht

  • IIS express requests take 4 times longer to execute

    Jan 25, 2011 03:27 PM|tuvsnyder|LINK

    Found that  IIS express requests take 4 times longer to execute!

    I have uploaded the WCAT results run on windows 7, same script,  to http://d1yb9lkqglrfzu.cloudfront.net/IISExpress-100VU-MachineConfig.zip

    asp.net config and iis express asp.net were both modified for 5000 requests max. Both are running under integrated CLR 2.0 app pool running the same exact asp.net application with debug set to false

    Findings:

    1.IIS Express has slighter higher requests per second, and total transactions served than normal IIS.

    2.IIS Express is executing up to 100 requests at a time, while normal IIS on windows 7 is limited to 10 as designed.

    3.IIS express is using 30% higher cpu, probably because of additional requests it handles at a time. 4.But on average Express requests take much longer to complete..up to 4 times longer. see Request Execution Time performance counter and time analysis (first and last byte).

    Express is only able to beat IIS in total requests served because it can handle more requests at a time!

     

    Theories
    1.Could the fact that IIS express is printing each request to command line window even with trace set none be slowing it down. (any way to stop this?!)
    2.I also noticed a lot of additional modules registered in IIS express applicationhost.config that are not in IIS applicationhost.config. Could then extra debugging/tracing modules be causing the problem.
    3. I notice IIS express does not have FileCache and HTTPCache modules. Could that be why?


    I'm hoping asp.net experts can clarify how these results are possible if IIS express is not limited or intentionally crippled. I was hoping to use IIS express as my personal web server, but now see that I'm betting sticking with IIS that comes with Windows.

    IIS Express IIS 7 on Windows 7 IIs 7

  • Re: IIS express requests take 4 times longer to execute

    Jan 25, 2011 04:12 PM|davcox|LINK

    Yes, you should expect that IIS Express is not as fast as IIS on Windows 2008 R2.

    A couple reasons:

    • <div mce_keep="true">the product is compiled to work on XP and above and so has to use the lowest common denominator API's, libraries and modules</div>
    • <div mce_keep="true">we don't use the kernel mode cache at all and so we don't get the automatic caching that it provides for static content</div>
    • <div mce_keep="true">we use user-mode logging, instead of kernel mode logging</div>
    • <div mce_keep="true">like you said, running iisexpress.exe from a cmdline will dump trace output which could slow down iis express</div>

    Dave

  • Rovastar Rovastar

    5446 Posts

    MVP

    Moderator

    Re: IIS express requests take 4 times longer to execute

    Jan 25, 2011 04:26 PM|Rovastar|LINK

    tuvsnyder


    I'm hoping asp.net experts can clarify how these results are possible if IIS express is not limited or intentionally crippled. I was hoping to use IIS express as my personal web server, but now see that I'm betting sticking with IIS that comes with Windows.

     

    IIS express was never AFAIC  meant to be used as anything other then a dev tool. I hope not anyway....

    Really you should be comparing the performance of an app with a proper server version of IIS.

    Troubleshoot IIS in style
    https://www.leansentry.com/
  • Re: IIS express requests take 4 times longer to execute

    Jan 25, 2011 05:03 PM|tuvsnyder|LINK

    I am not comparing against IIS running on windows server 2008. I'm comparing against IIS7 running on Windows 7, on the same machine with quad core which is limited to 10 requests at a time. And it executes requests not just twice as fast as IIS Express which would be acceptable, but 400% as fast as IIS express. if this was the case then Scott Gunthrie should not have even bothered modfying the EULA to distribute IIS express, instead he should have warned people that performance on IIS express is so terrible that even a crippled IIS with 10 requests will beat it.

    And why not allow people to disable these traces from the command line, since the only way to run IIS express is from the command line. How can I use IIS Express as an embedded web server for any product, if its constantly spitting out hundreds of messages to the command line window.

  • Re: IIS express requests take 4 times longer to execute

    Jan 25, 2011 05:06 PM|tuvsnyder|LINK

    Scott Gunthrie implied that it can be used an an embedded web server without any requests restrictions. Hence the term express and not 'developer tool'.  I was never expecting it to be as fast as IIS on WinServer, but I was hoping for it to improve over IIS-Win7 on WCAT, not lose to it.
  • Rovastar Rovastar

    5446 Posts

    MVP

    Moderator

    Re: IIS express requests take 4 times longer to execute

    Jan 25, 2011 05:46 PM|Rovastar|LINK

    Of course IIS express is a dev tool. Do you really think it is a production piece of web server software?.....

    I tell you what IIS express is nothing the IIS admin community wanted (it just causes more confusion) it was a dev request and to be honest only smaller devs too as most devs will have a dev server like their production environment.

    "use IIS Express as an embedded web server"

    God help us all...that is a terrible idea.

    And like I said before don't use this or desktop version of IIS for *performance* related tasks use the server version.

     

    Troubleshoot IIS in style
    https://www.leansentry.com/
  • Re: IIS express requests take 4 times longer to execute

    Jan 25, 2011 05:54 PM|tuvsnyder|LINK

    Well my mistake i guess..I read this http://weblogs.asp.net/scottgu/archive/2011/01/13/announcing-release-of-asp-net-mvc-3-iis-express-sql-ce-4-web-farm-framework-orchard-webmatrix.aspx

    Today we are also shipping IIS Express 7.5. IIS Express is a free version of IIS 7.5 that is optimized for developer scenarios. It works for both ASP.NET Web Forms and ASP.NET MVC project types.
    We think IIS Express combines the ease of use of the ASP.NET Web Server (aka Cassini) currently built-into Visual Studio today with the full power of IIS. Specifically:
    •It’s lightweight and easy to install (less than 5Mb download and a quick install)
    •It does not require an administrator account to run/debug applications from Visual Studio
    •It enables a full web-server feature set<– including SSL, URL Rewrite, and other IIS 7.x modules
    ...


    IIS Express (like the ASP.NET Development Server) can be quickly launched to run a site from a directory on disk. It does not require any registration/configuration steps. This makes it really easy to launch and run for development scenarios. You can also optionally redistribute IIS Express with your own applications if you want a lightweight web-server. The standard IIS Express EULA now includes redistributable rights

    OK so that being said can anyone help me attempt to optimize IIS express so requests only take twice as long as IIS. Such as disabling the extra traces in the command window. Anyone??

  • Rovastar Rovastar

    5446 Posts

    MVP

    Moderator

    Re: IIS express requests take 4 times longer to execute

    Jan 25, 2011 06:03 PM|Rovastar|LINK

    Thanks for confirming it is a dev tool for me.

    I still think that embedding is a terrible idea Express products just undervalue the good work that proper products do and are not fit for purpose.

    Troubleshoot IIS in style
    https://www.leansentry.com/
  • Re: IIS express requests take 4 times longer to execute

    Jan 27, 2011 02:26 PM|glenh|LINK

    tuvsnyder

    OK so that being said can anyone help me attempt to optimize IIS express so requests only take twice as long as IIS. Such as disabling the extra traces in the command window. Anyone??
     

    I am a firm believer in embedded web servers for small self-hosted sites and I produce such a product myself - MyCourts.

    IIS Express will replace Abyss in my case for a number of reasons however the poor performance of IIS Express compared to Abyss is not really a limiting factor,

    The users of the service will be happy with the IIS Express performance level as is. However, us perfectionists probably won't be.

    In time, IIS Express will incorporate the features mentioned in this thread however given Microsoft's past track record I wouldn't hold my breath.

    In all fairness though, IIS Express is looking good and Microsoft should be given credit for opening up it's products for the small business sector. You can't get better than 'FREE' and if performance is really a limiting factor for you then I guess you really should be looking to the full version to meet your needs.

  • Re: IIS express requests take 4 times longer to execute

    Jan 28, 2011 01:29 PM|davcox|LINK

    IIS Express was built as a developer focused server and the default configuration is setup for maximum debuggability.  There are several configuration changes you can make to dramatically improve performance (but will lower debuggability).  Probably one of the more significant changes you can make is to disable the Failed Request Tracing logging; which is on by default for all requests.  Probably we'll write a blog post soon on configuring IIS Express for faster performance. 

    We would love to use the kernel mode caching, but since we are trying to support XP (and all the other OS's), we could not use that API set for caching; once we're able to drop XP support, we should be able to make use of that API. 

    Dave

  • Re: IIS express requests take 4 times longer to execute

    Jan 28, 2011 02:19 PM|tuvsnyder|LINK

    Thanks for all your advise. I seem to have found the magic formula for our web app for IIS express performance to now beats IIS7-Windows7 in WCAT in both transactions and requests a second and average time to first byte. It's configured as follows
     
    iisexpress.exe > NUL in cmd.exe
    traceFailedRequestsLogging false
    dontlog=false and selectiveLogging=LogError
    requestspersecond in asp.net = 500 since some of our requests are short but others can take a while. at 1000+ we found less requests per second/higher cpu.

    attached find the comparison. IISExpress requests now take on average 3x times longer than IIS, making it well up in concurrent requests handled. I think a lot of that has to do with not having server side caching available at all since some of the IIS requests take 0 to execute as opposed to IISExpress which has a min of 3.
     
    http://d1yb9lkqglrfzu.cloudfront.net/iisexpresswincompare.zip
     

  • Re: IIS express requests take 4 times longer to execute

    Nov 05, 2011 11:12 AM|kobruleht|LINK

    I added

            <httpLogging dontLog="false" selectiveLogging="LogError" />

    but 304 response codes still appear in log file.

    Is this bug? How to disable 304 response codes in log file ?

    You should run iisexpress as windows service to get huge perfomance boost.

    Microsoft Community Contributor