Slow Performance Azure Web Application + Azure SQL DB

I have moved the existing asp.net web-api from Azure VM (with local IIS and MSSQL installed locally) to the Azure web application and the Azure SQL database (both West European). I notice a sharp increase in processing time between them for the same workload. Tasks that take 10-15 ms in a virtual machine take at least 150 ms in a hosting environment. And internal processing, not including network latency to / from vm or web application. Both with empty databases and with a code base. The same database schema with the same indexing.

The VM was a simple dual-core / 7GB SSD machine. But even when I install my web application on a premium 4-core / 7GB and my database on a premium 250DTU, performance does not increase at all. In fact, this is the same on the basic 2-core web application and the 10DTU database. So the bottleneck should be somewhere else.

How do I know what causes slow processing? The web application and database do not show any performance warnings and do not recommend scaling as well.

+5
source share
3 answers

/ , , :

-

go

select * 
from sys.dm_exec_session_wait_stats
where session_id = @@spid
order by wait_time_ms desc

SELECT .

Query Store.

http://www.sqlcoffee.com/Azure_0010.htm

, ,

select  wait_category_desc, sum(total_query_wait_time_ms) as [sum ms], count(*) as [interval cnt],  avg(avg_query_wait_time_ms) as [avg ms], sum(total_query_wait_time_ms / avg_query_wait_time_ms) as [wait cnt]
from sys.query_store_wait_stats
group by wait_category_desc
order by [sum ms] desc

.

https://docs.microsoft.com/en-us/sql/relational-databases/system-catalog-views/sys-query-store-wait-stats-transact-sql

, .

0

: Azure Web App + Azure DB= Slow DB returns to client.

, , .

. S1, , .

  1. Premium S2
  2. . > 10 .

, - .

0

: Azure Web App Azure DB Azure DB , .

, . . S1, , .

• Premium S2

• - .


I am not sure why my previous answer should be a duplicate, this is a problem if I am the author of the post of the same answer to another question, and if the answer is applicable and is correct as it is. It makes no sense to change this just because. Please comment first and give me the option to edit before completely deleting ...

0
source

Source: https://habr.com/ru/post/1680863/


All Articles