I'm doing some performance testing on ASP.NET Core 3.1. I've created a dummy web app that just returns a statically allocated struct as shown below:
[Route("api/[controller]")]
[ApiController]
public class DummyController : ControllerBase
{
private static State _state = new State();
public State Get()
{
return _state;
}
}
When run under IIS this app supports requests/sec that is half of what it can achieve under Kestrel. Under IIS it unable to exhaust the CPU capacity whereas within Kestrel it maxes out all cores. Does anyone know of common reasons why this could be? I've googled it and found people reporting the opposite problem (i.e slower under Kestrel), but not this.
I'm running the app InProcess
under IIS. IIS version is 10 and the OS is Windows 10 1903. The machine's got 16 cores and 32 logical processes. I'm testing using bombardier via loopback (i.e. bombardier is running on the same machine as the app).