zoukankan      html  css  js  c++  java
  • sqlserver的资源调控器

    参考SQL Server2014管理最佳实战,所做的笔记。
    1:创建资源池
    use master
    go
    create resource pool poolAdhoc with
    (
    min_cpu_percent=10,max_cpu_percent=30,
    min_memory_percent=15,max_memory_percent=25
    --min_iops_per_volume=0,max_iops_per_volume=2111111111
    );
    
    
    create resource pool poolReports with
    (
    min_cpu_percent=20,max_cpu_percent=35,
    min_memory_percent=15,max_memory_percent=45
    --min_iops_per_volume=0,max_iops_per_volume=2111111111
    );
    
    create resource pool poolAdmin with
    (
    min_cpu_percent=15,max_cpu_percent=25,
    min_memory_percent=15,max_memory_percent=25
    );

    2:创建工作负载组并且关联以上三个资源池

    create workload group  groupAdhoc using poolAdhoc;
    create workload group  groupReports using poolReports;
    create workload group  groupAdmin using poolAdmin;

    3:创建用户定义的分类函数:

    create function rgtest() returns sysname with schemabinding as begin declare @pg_name as sysname if(user_name()='sa') set @pg_name='poolAdhoc' --if (app_name()) return @pg_name end; go

    4:将用户自定义的分类函数注册到资源调控器

    alter resource governor with(classifier_function=dbo.rgtest);

    5,:启用资源管理器

    alter resource governor reconfigure

    Resource Governor 能够自动判断资源分配比例,如果没有竞争资源池的话,那么会分配100%资源应用,如果竞争激烈,会按照比例分配。从而使得各个资源池中的对象都能够使用一定的服务器资源完成自己的工作,从而可以使得我们预测系统的最差情况,增强对数据库的管理性。

  • 相关阅读:
    nginx升级总结,漏洞升级
    【BUG解决】在git上pull时提示You have not concluded your merge. (MERGE_HEAD exists)
    如何自签名把http网站变成https网站(https自签名方法)
    ifly
    Shell排序和二叉树排序
    C/C++复习笔记(2)
    C/C++复习笔记(1)
    C语言字符串操作
    python+flask
    C语言的一点复习
  • 原文地址:https://www.cnblogs.com/shengdimaya/p/9072816.html
Copyright © 2011-2022 走看看