SqlServer性能优化 性能调控(十)

网友投稿 532 2022-08-31

SqlServer性能优化 性能调控(十)

SqlServer性能优化 性能调控(十)

如何做资源的调控:

1.建立资源池。

2.创建工作负荷组

create resource pool ImporPool with ( min_cpu_percent=30,max_cpu_percent=100, min_memory_percent=40,max_memory_percent=95 ) --不太重要的资源池 create resource pool PooPool with ( min_cpu_percent=5,max_cpu_percent=100, min_memory_percent=10,max_memory_percent=95 ) --创建工作负荷组 create workload group ERPGroup with ( --重要性 importance=high )using ImporPool create workload group ADGroup with ( --重要性 importance=medium )using ImporPool create workload group ReportingGroup with(importance=high)using PooPoolcreate workload group PrintGroup with(importance=medium)using PooPool

--如何将应用与资源池进行对应呢?--创建分类器函数

create function fn_resourceslip()returns sysname with schemabindingasbeginreturn case app_name() when 'erpapp' then 'ERPGroup' when 'adapp' then 'ADGroup' when 'reportingapp' then 'ReportingGroup' when 'printapp' then 'PrintGroup' endend

属性资源调控器:

在Web.config中:

--资源调控器的配置信息select * from sys.dm_resource_governor_configuration--查看资源池的信息select * from sys.dm_resource_governor_resource_pools--工作负荷组的情况select * from sys.dm_resource_governor_workload_groups--数据备份create function fn_resourceslip()returns sysname with schemabindingasbeginreturn case user_name() when 'msshcj\administrator' then 'PrintGroup' when 'hruser' then 'ERPGroup' endend

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:SqlServer性能优化 提高并发性能(八)
下一篇:Go语言的结构体布局(golang 结构)
相关文章

 发表评论

暂时没有评论,来抢沙发吧~