zoukankan      html  css  js  c++  java
  • 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 PooPool
    
    create workload group PrintGroup with
    (
    importance=medium
    )using PooPool
    

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

    create function fn_resourceslip()
    returns sysname with schemabinding
    as
    begin
    return 
      case app_name()
      when 'erpapp' then 'ERPGroup'
      when 'adapp' then 'ADGroup'
      when 'reportingapp' then 'ReportingGroup'
      when 'printapp' then 'PrintGroup'
      end
    end
    

      属性资源调控器:

    在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 schemabinding
    as
    begin
    return 
      case user_name()
      when 'msshcjadministrator' then 'PrintGroup'
      when 'hruser' then 'ERPGroup'
      end
    end
    
  • 相关阅读:
    MVC视图布局页常用代码
    常用meta标签及说明
    重新认识Android
    为什么V8引擎这么快?
    node.js入门及express.js框架
    红星美凯龙CEO车建新的圆融和霸气
    【一个王朝的背影】--余秋雨
    Android源代码结构分析
    Android文件系统的结构
    Mac OSX 平台安装 MongoDB
  • 原文地址:https://www.cnblogs.com/sunliyuan/p/6246570.html
Copyright © 2011-2022 走看看