이유's Programming/DBMS

database paraellel 관리

살아가는 이유_EU 2025. 1. 15. 19:17
728x90
반응형

maxDop 이슈 해결 

-

MAXDOP often reduces duration for CPU-intensive queries. However, excessive parallelism can worsen other concurrent workload performance by starving other queries of CPU and worker thread resources. In extreme cases, excessive parallelism can consume all database or elastic pool resources, causing query timeouts, errors, and application outages.

  • -> excessive parallelism 도 문제가 많음.
  • When you see high CPU, is this application issue or backend Ops issue? If it's application issue, application team needs to tune the queries used by application or upgrade SLO. If it's Ops issue, SQL DB team needs to handle .

 

maxDOP(Maximum Degree of Parallelism)은 SQL Server에서 쿼리 실행 계획이 병렬 처리를 사용하는 방식을 제어하는 중요한 설정입니다. 잘못된 maxDOP 설정은 성능 저하, 자원 과다 사용, 응답 시간 증가 등의 문제를 야기할 수 있습니다. 이 이슈를 해결하려면 상황별로 적합한 접근법을 선택해야 합니다.

하지만 이럴 경우 이제 maxDop 을 하면 병렬 처리를 이제 설정하게 되면 다른 DB 의 이슈가 있을 수도 있으니 좀 신중하게 해야합니다.

 

높은 cpu 를 유발하는 쿼리가 존재했지만 이 경우에 parallel 의 설정인 maxDOP (Excessive parallel) 의 경우 신중해서 이제 적응을 해야한다. 

 

 

MAXDOPBehavior

= 1 The database engine uses a single serial thread to execute queries. Parallel threads are not used.
> 1 The database engine sets the number of additional schedulers to be used by parallel threads to the MAXDOP value, or the total number of logical processors, whichever is smaller.
= 0 The database engine sets the number of additional schedulers to be used by parallel threads to the total number of logical processors or 64, whichever is smaller

 

728x90
반응형