My web application is pretty ok in terms of speed, when I develop it, but as soon as I have higher load, cpu usage goes up to 100%, the ventilators spin up considerably and it is impossible to deploy. It seems anything more than 30 or so concurrent requests will kill the server.
Of course I could add caching and some problems would go away, but I'd like to go to the root of this. Nothing I am doing justifies this behavior. And mind, it is not sql server who is doing this, it is iis or webdev.webserver. I am not doing anything computing intensive (at least willingly).
I started to profile the app with an eap of dottrace 4.0 and, if I identify hot spots it does not show me anything obvious (but it is possible I just cannot read the output).
I have got a few calls to System.Net.UnsafeNclNativeMethods+SafeNetHandles.accept(IntPtr, Byte[0..], Int32&) and System.Windows.Forms.UnsafeNativeMethods.WaitMessage(), but both seem to stem from the main iis thread, and even if they take a long time with few calls, I suppose, that's just how they are. Both take aprox. 17% wall time. I have no unsfae code in my codebase. Them Garbage collection takes 5%, then there are a few methods with 5-4%, an then a whole load with 0,something %.
All this does not really tell me anything. Where should I look and how?