7. RESOURCE GOVERNOR- Resource Pools
CPU, 覃覈襴 MIN MAX れ
覈 MIN 螳 覯 襴 100% 豐螻 , MAX 螳 MIN螻 100% 伎
螳 れ.
MAX% = min(x, 100-sum(min%)), 螻磯 螻旧% = MAX% - MIN%
Pool MIN % MAX % MAX% 螻磯 螻旧 % る
Internal 0 100 100 0 企 Pool 覈詩
Default 0 100 30 30 Min( 100, 100-(20+50)), max-min =30-0
Pool 1 20 100 50 30 Min(100,100-50), 50-20 = 20
Pool 2 50 70 70 20 Min(70, 100-20), 70-50 = 30
8. RESOURCE GOVERNOR- Resource Pools
伎
Pool MIN % MAX % MAX% 螻磯 螻旧 % る
Internal 0 100 100 0
Default 0 100
Pool 1 20 100
Pool 2 50 70
Pool 3 5 100
矩 Pool MIN 0 %, MAX 100 % 朱?
矩 Pool MIN 100% る ?
9. Step
Create resource Pools
Create Workload Groups
Create classifier function
Enable resource Governor
Monitoring
12. 覈磯
-- 襴り襴category view
-- veiw any definition, 覲蟆曙control server
select * from sys.resource_governor_configuration with (nolock)
SELECT
classifier_function_id
,object_schema_name(classifier_function_id) AS 'Classifier UDF schema'
,object_name(classifier_function_id) AS 'Classifier UDF name'
,is_enabled
FROM sys.resource_governor_configuration
GO
-- resource pool info
select * from sys.resource_governor_resource_pools with (nolock)
select * from sys.resource_governor_workload_groups with (nolock)
-- 襴り襴襯朱蟆渚蟲焔誤覿
select * from sys.dm_resource_governor_configuration with (nolock)
select * from sys.dm_resource_governor_workload_groups with (nolock)
select * from sys.dm_resource_governor_resource_pools as with (nolock)
select p.pool_id, p.name, p.statistics_start_time
, p.total_cpu_usage_ms,p.used_memgrant_kb, p.active_memgrant_kb
, p.min_cpu_percent, p.max_cpu_percent, p.min_memory_percent, p.max_memory_percent
, g.name, g.importance,g.total_cpu_usage_ms, g.max_dop
, g.total_query_optimization_count, g.active_parallel_thread_count
from sys.dm_resource_governor_resource_pools as p with (nolock)
join sys.dm_resource_governor_workload_groups as g with (nolock)
on p.pool_id = g.pool_id
order by p.pool_id