From 9b4a51ee37f42669f153a527219bb2b0ca211ca6 Mon Sep 17 00:00:00 2001 From: Blake Drumm Date: Tue, 31 Oct 2023 14:04:44 -0400 Subject: [PATCH] Updated MaxDOP Calculation again :ocean: --- SQL Queries/maxdop_calculator.sql | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/SQL Queries/maxdop_calculator.sql b/SQL Queries/maxdop_calculator.sql index 013867c..4458356 100644 --- a/SQL Queries/maxdop_calculator.sql +++ b/SQL Queries/maxdop_calculator.sql @@ -68,6 +68,10 @@ BEGIN SET @RecommendedMaxDop = @LogicalCPUsPerNumaNode; ELSE SET @RecommendedMaxDop = @LogicalCPUsPerNumaNode / 2; + + -- Ensure the MAXDOP does not exceed half the number of logical CPUs per NUMA node + IF @RecommendedMaxDop > @LogicalCPUsPerNumaNode / 2 + SET @RecommendedMaxDop = @LogicalCPUsPerNumaNode / 2; END -- Define a table variable to store the results