Praveena M
Praveena M

Reputation: 522

Azure AppService Performance Issue

We have ASP.Net Core 2.1 Web API hosted in AppService (S1) that talks to Azure SQL DB (S1-20DTUs). Both are in same region. During load testing we found that some API instances are taking too much time to return the result.

We tried to troubleshoot the performance issue and below are our observations.

  1. API responds within 0.5 secs most of the time.
  2. API methods are all async methods.
  3. Sometimes it takes around 50 secs to over a minute.
  4. CPU & Memory utilization are below 60%
  5. Database has 20 DTU capacity, out of which 6 DTUs are used during load testing.
  6. In the below example snapshot from Application Insights, we see total duration of the request was 27.4 secs. But the database dependency duration was just 97ms. There is no activity till the database was called. Please refer below example.

Can someone please help me to understand what was happening in this 27 secs of wait time. What could be the reason for this?

enter image description here

Upvotes: 1

Views: 1555

Answers (2)

Guru Pasupathy
Guru Pasupathy

Reputation: 470

The S1 tier will support no more than 900 concurrent session. If you request per second (RPS rate) during the load test is very high you may face issues.

Also S3 and above are recommended for intensive workloads. Checking if all the connections are closed properly also helps

You can find details about different pricing tiers and their capabilities in the below link https://learn.microsoft.com/en-us/azure/sql-database/sql-database-dtu-resource-limits-single-databases

Upvotes: 0

rohit
rohit

Reputation: 704

  1. I would recommend checking the Application Map on Application Insights resource as shown below to double check the dependencies.

enter image description here

  1. Verify the CPU and Memory metrics by going to the "Diagnose and solve problems" link on App service as shown below and run the Availability and Performance report to find out if there were any issues during your load testing.

enter image description here

  1. Use Async methods on your API to maximize the CPU usage. It may be that the worker process threads are hitting the limits and your app is the bottleneck. You should get some insights when you run the report mentioned in point 2 above.

Upvotes: 1

Related Questions