I have a Self-Host OWIN http server basing on Microsoft.Owin.SelfHost v3.1.0 encountering performance issue. There are only a few hundreds requests but CPU went to 100% and the server cannot serve more requests.
All my methods are asynchronous and there is no blocking I/O operation.
By attaching a profiler when running load test, I get the following result.
It surprises me my application code only takes up less than 10% CPU. Most of CPU time is consumed by the framework.
System.Net.ListenerAsyncResult.QueueBeginGetContext()
consumes 35%
OwinHttpListener.ProcessRequestAsync
consumed 23%
It seems abnormal to me, but I don't know where the issue is.
Please does anyone has any idea?