Search code examples
performancejmeterasp.net-web-api2iis-7.5performance-testing

IIS 7.5 WebAPI performance scaling issue


I have issues with response times spiked with a WebAPI solution in IIS. I generate load using a simple JMeter test plan, running on my development machine. My test plan repeats 15 static calls using fifteen threads. The load is about 90K requests over 7 minutes. The throughput is around 203 requests per second.

During the thread ramp up, where JMeter is increasing the load, the response times start to contain spikes which continue throughout the entire test. The machine and application don’t really seem to break a sweat: the load on the CPU is about 30-40%, so nowhere near saturated. The application did not return a single error during the entire test.

The specifics about the application and the machine:

  • The application is a .Net 4.6 WebAPI solution. The cache is in memory on the machine itself.
  • Hosted on IIS 7.5, on a 4CPU /4GB RAM machine
  • Integrated pipeline application pool (.Net 4) using one worker process
  • The process model is set to auto config in the machine.config file.

What I tried so far to resolve this issue:

  • Eliminate the influence from the network and other infrastructure by executing the tests on different machines and locations. Even on the machine itself with localhost in the calls.
  • Increased the “ASP Threads Per Processor Limit” from 25 to 100 (the maximum)
  • Increasing the number of worker processes to 4
  • Disable the IIS logging completely
  • Enabling and disabling the dynamic content compression

Hopefully, someone will be able to point me in the right direction. Thanks!


Solution

  • I would recommend going for the next steps:

    1. Double check JMeter machine health, if JMeter machine doesn't have enough resources the execution may pause due to garbage collections on JVM or swapping on OS levels. Moreover, JMeter default settings are suitable for tests development and debugging only, you need to tweak at least some JVM parameters before running your test. References:

    2. Re-run your test under a profiler tool telemetry on IIS side, check out tools like dotTrace or ANTS, maybe something is wrong with your application code.