{"id":10490,"date":"2019-03-15T21:32:05","date_gmt":"2019-03-15T21:32:05","guid":{"rendered":"https:\/\/dbtut.com\/?p=10490"},"modified":"2019-03-15T21:32:05","modified_gmt":"2019-03-15T21:32:05","slug":"how-to-limit-a-users-resource-usage-using-resource-governor","status":"publish","type":"post","link":"https:\/\/dbtut.com\/index.php\/2019\/03\/15\/how-to-limit-a-users-resource-usage-using-resource-governor\/","title":{"rendered":"How To Limit a User&#8217;s Resource Usage Using Resource Governor"},"content":{"rendered":"<p>&nbsp;<\/p>\n<p>Resource Governor announced with SQL Server 2008. We are able to limit resources of a session using Resource Governor. For example, a report user is executing report queries and consume entire memory and cpu in the operating system. Therefore, memory and CPU bottleneck cause slowness in other applications. In such a case, we can use Resource Governor to limit the resources that the report user uses.<\/p>\n<p>We could limit only memory and CPU usage until SQL Server 2014. We couldn&#8217;t limit the I\/O. We can also limit IO using Max and Min IOPS since SQL Server 2014.<\/p>\n<h3>There are 3 concepts you need to understand in Resource Governor:<\/h3>\n<h3>Resource Pool<\/h3>\n<p>Represents the resources of the server. You can think of a virtual instance in the instance. By default, 2 resource pools are created. (Internal and default)<\/p>\n<p>When we use resource Governor to limit users, we create our own resource pools to limit. In fact, we limit these resource pools, not users. In the following example, the maximum CPU ratio that resource pool can use is limited to 20%.<\/p>\n<pre class=\"lang:default decode:true\">CREATE RESOURCE POOL [ReportPool] \r\nWITH(\r\n     MAX_CPU_PERCENT=20, \r\n    )\r\n<\/pre>\n<p><strong>internal pool:<\/strong> The pool that SQL Server uses for its internal work.<\/p>\n<p><strong>default pool:<\/strong> This is the first user defined pool in the resource governor. If the Resource Governor enabled, Undirected connections to the &#8220;user defined resource pool&#8221; come to this pool.<\/p>\n<h3>Workload Group<\/h3>\n<p>You can think of this as a container that can be used to redirect queries with the same criteria to the related resource pool. One or more workload groups can be redirected to 1 resource pool.<\/p>\n<h3>Classification<\/h3>\n<p>With Classifier Function, requests sent by sessions are checked and directed to the specified workload group.<\/p>\n<p>To better understand Resource Governor, let&#8217;s make an example about cpu, memory and disk limitations.<\/p>\n<p>First, we activate Resource Governor through SSMS as follows.<\/p>\n<p id=\"cXQHHCs\"><img loading=\"lazy\" decoding=\"async\" width=\"449\" height=\"288\" class=\"size-full wp-image-10493  aligncenter\" src=\"https:\/\/dbtut.com\/wp-content\/uploads\/2019\/03\/img_5c8c16e29bc48.png\" alt=\"\" \/><\/p>\n<p>We then create the resource pool to be limited, using the following query. We will make sure that the queries from this resource pool do not exceed 20% of the maximum CPU , 30% of the maximum memory, and 1000 of the IOPS per volume.<\/p>\n<p>With the CAP_CPU_PERCENT parameter, we say that it can use up to 80% of the maximum, even with cpu idle.<\/p>\n<p><strong>What is the difference between\u00a0 CAP_CPU_PERCENT MAX_CPU_PERCENT?<\/strong><\/p>\n<p>When we set the MAX_CPU_PERCENT parameter for a resource pool, if the cpu is idle, resource pool could exceed the max cpu limit reserved for it and it could use the whole CPU. Therefore, there could be short-term problems when other applications or other queries in the operating system needed CPU.<\/p>\n<p>When we set the CAP_CPU_PERCENT parameter, we set the maximum CPU that the resource pool can use, even if it is cpu idle. In this way, other applications or queries other than the resource pool do not experience this problem.<\/p>\n<p>In the example, with the AFFINITY SCHEDULER parameter, we specify that the resource pool will use schedulers eighth, and from 12 to 16.<\/p>\n<pre class=\"lang:default decode:true\">CREATE RESOURCE POOL [ReportPool] \r\nWITH(\r\n\t\tMAX_CPU_PERCENT=20, \r\n\t\tMAX_MEMORY_PERCENT=30,\r\n\t\tCAP_CPU_PERCENT = 80, \r\n\t\tMAX_IOPS_PER_VOLUME=1000,\r\n\t\tAFFINITY SCHEDULER = (8, 12 TO 16)\r\n\t)\r\n<\/pre>\n<p>We create the related workload group using the following script.<\/p>\n<pre class=\"lang:default decode:true\">CREATE WORKLOAD GROUP [ReportGroup] \r\nUSING [ReportPool]\r\nGO\r\nALTER RESOURCE GOVERNOR RECONFIGURE;\r\nGO\r\n<\/pre>\n<p>Then we need to create the classifier function that will redirect the report related queries to the related workload group. In the following example, we redirect the following users to the ReportGroup workload group.<\/p>\n<ul type=\"disc\">\n<li>If the user name is ReportUser<\/li>\n<li>If the application name is &#8220;MyApplication&#8221;<\/li>\n<li>If the host name is &#8220;MyServer&#8221;<\/li>\n<\/ul>\n<pre class=\"lang:default decode:true\">CREATE FUNCTION Class_Func() RETURNS SYSNAME WITH SCHEMABINDING\r\nAS\r\nBEGIN\r\n  DECLARE @workload_group sysname;\r\n \r\n  IF ( SUSER_SNAME() = 'ReportUser')\r\n      SET @workload_group = 'ReportGroup';\r\n  ELSE IF (APP_NAME() = 'MyApplication')\r\n\t  SET @workload_group = 'ReportGroup';\r\n  ELSE IF (HOST_NAME() = 'MyServer')\r\n\t  SET @workload_group = 'ReportGroup';\r\n  RETURN @workload_group;\r\nEND;\r\n<\/pre>\n<p>Finally, we are running the following script for the resource governor to work with the Class_Func function we created above.<\/p>\n<pre class=\"lang:default decode:true\">USE master\r\nGO\r\nALTER RESOURCE GOVERNOR WITH (CLASSIFIER_FUNCTION = dbo.Class_Func);\r\nGO\r\nALTER RESOURCE GOVERNOR RECONFIGURE;\r\n<\/pre>\n<p>If two workload groups shares a resource pool , you can assign a priority to one of the workload groups as follows.<\/p>\n<pre class=\"lang:default decode:true\">ALTER WORKLOAD GROUP ReportGroup\r\nWITH (IMPORTANCE = High)\r\n<\/pre>\n<p>You can configuru other settings for Workload Groups as follows.<\/p>\n<pre class=\"lang:default decode:true\">ALTER WORKLOAD GROUP ReportGroup\r\nWITH \r\n(\r\n--Determines the maximum percentage of memory that a single query can use in the pool. \r\nREQUEST_MAX_MEMORY_GRANT_PERCENT=20, \r\n--The information that the CPU threshold is exceeded is triggered after 5 seconds. The query is not stopped. \r\nREQUEST_MAX_CPU_TIME_SEC = 5,\r\n--Specifies the maximum wait time for a query to take memory. \r\n--In this example, if the query does not take memory for 5 seconds, it will be timeout. \r\nREQUEST_MEMORY_GRANT_TIMEOUT_SEC=5,\r\n--Specifies the maxdop setting that a query can run.\r\nMAX_DOP = 1, \r\n--Limits the number of queries that can run concurrently in the workload group. \r\n--In this example, maximum of 100 queries can run in this workload group at the same time.\r\nGROUP_MAX_REQUESTS = 100\r\n)\r\n<\/pre>\n<p>You can see the sessions in the worklad groups using the following query.<\/p>\n<pre class=\"lang:default decode:true \">SELECT s.session_id,s.login_name, g.name\r\nFROM sys.dm_exec_sessions AS s  \r\nINNER JOIN sys.dm_resource_governor_workload_groups AS g  \r\n    ON g.group_id = s.group_id  \r\n\twhere session_id&gt;60\r\nORDER BY g.name;  \r\nGO  \r\n<\/pre>\n<p>You can see the queries in the worklad groups using the following query.<\/p>\n<pre class=\"lang:default decode:true\">SELECT sder.group_id, wg.name, sder.status, sder.session_id, sder.request_id, \r\n    sder.start_time, sder.command, sder.sql_handle, st.text   \r\nFROM sys.dm_exec_requests AS sder  \r\nINNER JOIN sys.dm_resource_governor_workload_groups AS wg  \r\n    ON wg.group_id = sder.group_id  \r\nCROSS APPLY sys.dm_exec_sql_text(sder.sql_handle) AS st  \r\nORDER BY wg.name;  \r\n<\/pre>\n\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_10490\" class=\"pvc_stats all  \" data-element-id=\"10490\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/dbtut.com\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; Resource Governor announced with SQL Server 2008. We are able to limit resources of a session using Resource Governor. For example, a report user is executing report queries and consume entire memory and cpu in the operating system. Therefore, memory and CPU bottleneck cause slowness in other applications. In such a case, we can &hellip;<\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_10490\" class=\"pvc_stats all  \" data-element-id=\"10490\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/dbtut.com\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[3],"tags":[2568,2567,2455,2578,2569,2570,2574,2573,2580,2576,2561,2565,2572,2579,2581,2577,2563,2562,2564,2575,2582,2571,2560,2566],"class_list":["post-10490","post","type-post","status-publish","format-standard","","category-mssql","tag-alter-resource-governor","tag-alter-workload-group","tag-app_name","tag-cap_cpu_percent","tag-classifier_function","tag-create-classifier_function","tag-create-resource-pool","tag-create-workload-group","tag-default-pool","tag-difference-between-cap_cpu_percent-max_cpu_percent","tag-dm_resource_governor_workload_groups","tag-group_max_requests","tag-host_name","tag-internal-pool","tag-limit-io-using-resource-governor","tag-max_cpu_percent","tag-request_max_cpu_time_sec","tag-request_max_memory_grant_percent","tag-request_memory_grant_timeout_sec","tag-resource-pool","tag-sql-server-2014-resource-governor-new-features","tag-suser_sname","tag-sys-dm_resource_governor_workload_groups","tag-workload-group"],"aioseo_notices":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How To Limit a User&#039;s Resource Usage Using Resource Governor - Database Tutorials<\/title>\n<meta name=\"description\" content=\"How To Limit a User&#039;s Resource Usage Using Resource Governor\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/dbtut.com\/index.php\/2019\/03\/15\/how-to-limit-a-users-resource-usage-using-resource-governor\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How To Limit a User&#039;s Resource Usage Using Resource Governor - Database Tutorials\" \/>\n<meta property=\"og:description\" content=\"How To Limit a User&#039;s Resource Usage Using Resource Governor\" \/>\n<meta property=\"og:url\" content=\"https:\/\/dbtut.com\/index.php\/2019\/03\/15\/how-to-limit-a-users-resource-usage-using-resource-governor\/\" \/>\n<meta property=\"og:site_name\" content=\"Database Tutorials\" \/>\n<meta property=\"article:published_time\" content=\"2019-03-15T21:32:05+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/dbtut.com\/wp-content\/uploads\/2019\/03\/img_5c8c16e29bc48.png\" \/>\n<meta name=\"author\" content=\"dbtut\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"dbtut\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/dbtut.com\/index.php\/2019\/03\/15\/how-to-limit-a-users-resource-usage-using-resource-governor\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2019\/03\/15\/how-to-limit-a-users-resource-usage-using-resource-governor\/\"},\"author\":{\"name\":\"dbtut\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/person\/fc047c39e1e53dce28fc4253529ea408\"},\"headline\":\"How To Limit a User&#8217;s Resource Usage Using Resource Governor\",\"datePublished\":\"2019-03-15T21:32:05+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2019\/03\/15\/how-to-limit-a-users-resource-usage-using-resource-governor\/\"},\"wordCount\":636,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/dbtut.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2019\/03\/15\/how-to-limit-a-users-resource-usage-using-resource-governor\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2019\/03\/img_5c8c16e29bc48.png\",\"keywords\":[\"ALTER RESOURCE GOVERNOR\",\"ALTER WORKLOAD GROUP\",\"APP_NAME\",\"CAP_CPU_PERCENT\",\"CLASSIFIER_FUNCTION\",\"Create CLASSIFIER_FUNCTION\",\"CREATE RESOURCE POOL\",\"CREATE WORKLOAD GROUP\",\"default pool\",\"difference between\u00a0 CAP_CPU_PERCENT MAX_CPU_PERCENT\",\"dm_resource_governor_workload_groups\",\"GROUP_MAX_REQUESTS\",\"HOST_NAME\",\"internal pool\",\"limit IO using resource governor\",\"MAX_CPU_PERCENT\",\"REQUEST_MAX_CPU_TIME_SEC\",\"REQUEST_MAX_MEMORY_GRANT_PERCENT\",\"REQUEST_MEMORY_GRANT_TIMEOUT_SEC\",\"RESOURCE POOL\",\"SQL Server 2014 Resource Governor new features\",\"SUSER_SNAME\",\"sys.dm_resource_governor_workload_groups\",\"WORKLOAD GROUP\"],\"articleSection\":[\"MSSQL\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/dbtut.com\/index.php\/2019\/03\/15\/how-to-limit-a-users-resource-usage-using-resource-governor\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/dbtut.com\/index.php\/2019\/03\/15\/how-to-limit-a-users-resource-usage-using-resource-governor\/\",\"url\":\"https:\/\/dbtut.com\/index.php\/2019\/03\/15\/how-to-limit-a-users-resource-usage-using-resource-governor\/\",\"name\":\"How To Limit a User's Resource Usage Using Resource Governor - Database Tutorials\",\"isPartOf\":{\"@id\":\"https:\/\/dbtut.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2019\/03\/15\/how-to-limit-a-users-resource-usage-using-resource-governor\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2019\/03\/15\/how-to-limit-a-users-resource-usage-using-resource-governor\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2019\/03\/img_5c8c16e29bc48.png\",\"datePublished\":\"2019-03-15T21:32:05+00:00\",\"description\":\"How To Limit a User's Resource Usage Using Resource Governor\",\"breadcrumb\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2019\/03\/15\/how-to-limit-a-users-resource-usage-using-resource-governor\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/dbtut.com\/index.php\/2019\/03\/15\/how-to-limit-a-users-resource-usage-using-resource-governor\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/dbtut.com\/index.php\/2019\/03\/15\/how-to-limit-a-users-resource-usage-using-resource-governor\/#primaryimage\",\"url\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2019\/03\/img_5c8c16e29bc48.png\",\"contentUrl\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2019\/03\/img_5c8c16e29bc48.png\",\"width\":449,\"height\":288},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/dbtut.com\/index.php\/2019\/03\/15\/how-to-limit-a-users-resource-usage-using-resource-governor\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/dbtut.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How To Limit a User&#8217;s Resource Usage Using Resource Governor\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/dbtut.com\/#website\",\"url\":\"https:\/\/dbtut.com\/\",\"name\":\"Database Tutorials\",\"description\":\"MSSQL, Oracle, PostgreSQL, MySQL, MariaDB, DB2, Sybase, Teradata, Big Data, NOSQL, MongoDB, Couchbase, Cassandra, Windows, Linux\",\"publisher\":{\"@id\":\"https:\/\/dbtut.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/dbtut.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/dbtut.com\/#organization\",\"name\":\"dbtut\",\"url\":\"https:\/\/dbtut.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2021\/02\/dbtutlogo.jpg\",\"contentUrl\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2021\/02\/dbtutlogo.jpg\",\"width\":223,\"height\":36,\"caption\":\"dbtut\"},\"image\":{\"@id\":\"https:\/\/dbtut.com\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/person\/fc047c39e1e53dce28fc4253529ea408\",\"name\":\"dbtut\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/c322c32021bf651d9e103b183963c479a9c9791ead0715f4348203496c39aa54?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/c322c32021bf651d9e103b183963c479a9c9791ead0715f4348203496c39aa54?s=96&d=mm&r=g\",\"caption\":\"dbtut\"},\"description\":\"We are a team with over 10 years of database management and BI experience. Our Expertises: Oracle, SQL Server, PostgreSQL, MySQL, MongoDB, Elasticsearch, Kibana, Grafana.\",\"sameAs\":[\"http:\/\/NurullahCAKIR\"],\"url\":\"https:\/\/dbtut.com\/index.php\/author\/dbtut\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How To Limit a User's Resource Usage Using Resource Governor - Database Tutorials","description":"How To Limit a User's Resource Usage Using Resource Governor","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/dbtut.com\/index.php\/2019\/03\/15\/how-to-limit-a-users-resource-usage-using-resource-governor\/","og_locale":"en_US","og_type":"article","og_title":"How To Limit a User's Resource Usage Using Resource Governor - Database Tutorials","og_description":"How To Limit a User's Resource Usage Using Resource Governor","og_url":"https:\/\/dbtut.com\/index.php\/2019\/03\/15\/how-to-limit-a-users-resource-usage-using-resource-governor\/","og_site_name":"Database Tutorials","article_published_time":"2019-03-15T21:32:05+00:00","og_image":[{"url":"https:\/\/dbtut.com\/wp-content\/uploads\/2019\/03\/img_5c8c16e29bc48.png","type":"","width":"","height":""}],"author":"dbtut","twitter_card":"summary_large_image","twitter_misc":{"Written by":"dbtut","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/dbtut.com\/index.php\/2019\/03\/15\/how-to-limit-a-users-resource-usage-using-resource-governor\/#article","isPartOf":{"@id":"https:\/\/dbtut.com\/index.php\/2019\/03\/15\/how-to-limit-a-users-resource-usage-using-resource-governor\/"},"author":{"name":"dbtut","@id":"https:\/\/dbtut.com\/#\/schema\/person\/fc047c39e1e53dce28fc4253529ea408"},"headline":"How To Limit a User&#8217;s Resource Usage Using Resource Governor","datePublished":"2019-03-15T21:32:05+00:00","mainEntityOfPage":{"@id":"https:\/\/dbtut.com\/index.php\/2019\/03\/15\/how-to-limit-a-users-resource-usage-using-resource-governor\/"},"wordCount":636,"commentCount":0,"publisher":{"@id":"https:\/\/dbtut.com\/#organization"},"image":{"@id":"https:\/\/dbtut.com\/index.php\/2019\/03\/15\/how-to-limit-a-users-resource-usage-using-resource-governor\/#primaryimage"},"thumbnailUrl":"https:\/\/dbtut.com\/wp-content\/uploads\/2019\/03\/img_5c8c16e29bc48.png","keywords":["ALTER RESOURCE GOVERNOR","ALTER WORKLOAD GROUP","APP_NAME","CAP_CPU_PERCENT","CLASSIFIER_FUNCTION","Create CLASSIFIER_FUNCTION","CREATE RESOURCE POOL","CREATE WORKLOAD GROUP","default pool","difference between\u00a0 CAP_CPU_PERCENT MAX_CPU_PERCENT","dm_resource_governor_workload_groups","GROUP_MAX_REQUESTS","HOST_NAME","internal pool","limit IO using resource governor","MAX_CPU_PERCENT","REQUEST_MAX_CPU_TIME_SEC","REQUEST_MAX_MEMORY_GRANT_PERCENT","REQUEST_MEMORY_GRANT_TIMEOUT_SEC","RESOURCE POOL","SQL Server 2014 Resource Governor new features","SUSER_SNAME","sys.dm_resource_governor_workload_groups","WORKLOAD GROUP"],"articleSection":["MSSQL"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/dbtut.com\/index.php\/2019\/03\/15\/how-to-limit-a-users-resource-usage-using-resource-governor\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/dbtut.com\/index.php\/2019\/03\/15\/how-to-limit-a-users-resource-usage-using-resource-governor\/","url":"https:\/\/dbtut.com\/index.php\/2019\/03\/15\/how-to-limit-a-users-resource-usage-using-resource-governor\/","name":"How To Limit a User's Resource Usage Using Resource Governor - Database Tutorials","isPartOf":{"@id":"https:\/\/dbtut.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/dbtut.com\/index.php\/2019\/03\/15\/how-to-limit-a-users-resource-usage-using-resource-governor\/#primaryimage"},"image":{"@id":"https:\/\/dbtut.com\/index.php\/2019\/03\/15\/how-to-limit-a-users-resource-usage-using-resource-governor\/#primaryimage"},"thumbnailUrl":"https:\/\/dbtut.com\/wp-content\/uploads\/2019\/03\/img_5c8c16e29bc48.png","datePublished":"2019-03-15T21:32:05+00:00","description":"How To Limit a User's Resource Usage Using Resource Governor","breadcrumb":{"@id":"https:\/\/dbtut.com\/index.php\/2019\/03\/15\/how-to-limit-a-users-resource-usage-using-resource-governor\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/dbtut.com\/index.php\/2019\/03\/15\/how-to-limit-a-users-resource-usage-using-resource-governor\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/dbtut.com\/index.php\/2019\/03\/15\/how-to-limit-a-users-resource-usage-using-resource-governor\/#primaryimage","url":"https:\/\/dbtut.com\/wp-content\/uploads\/2019\/03\/img_5c8c16e29bc48.png","contentUrl":"https:\/\/dbtut.com\/wp-content\/uploads\/2019\/03\/img_5c8c16e29bc48.png","width":449,"height":288},{"@type":"BreadcrumbList","@id":"https:\/\/dbtut.com\/index.php\/2019\/03\/15\/how-to-limit-a-users-resource-usage-using-resource-governor\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/dbtut.com\/"},{"@type":"ListItem","position":2,"name":"How To Limit a User&#8217;s Resource Usage Using Resource Governor"}]},{"@type":"WebSite","@id":"https:\/\/dbtut.com\/#website","url":"https:\/\/dbtut.com\/","name":"Database Tutorials","description":"MSSQL, Oracle, PostgreSQL, MySQL, MariaDB, DB2, Sybase, Teradata, Big Data, NOSQL, MongoDB, Couchbase, Cassandra, Windows, Linux","publisher":{"@id":"https:\/\/dbtut.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/dbtut.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/dbtut.com\/#organization","name":"dbtut","url":"https:\/\/dbtut.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/dbtut.com\/#\/schema\/logo\/image\/","url":"https:\/\/dbtut.com\/wp-content\/uploads\/2021\/02\/dbtutlogo.jpg","contentUrl":"https:\/\/dbtut.com\/wp-content\/uploads\/2021\/02\/dbtutlogo.jpg","width":223,"height":36,"caption":"dbtut"},"image":{"@id":"https:\/\/dbtut.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/dbtut.com\/#\/schema\/person\/fc047c39e1e53dce28fc4253529ea408","name":"dbtut","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/dbtut.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/c322c32021bf651d9e103b183963c479a9c9791ead0715f4348203496c39aa54?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c322c32021bf651d9e103b183963c479a9c9791ead0715f4348203496c39aa54?s=96&d=mm&r=g","caption":"dbtut"},"description":"We are a team with over 10 years of database management and BI experience. Our Expertises: Oracle, SQL Server, PostgreSQL, MySQL, MongoDB, Elasticsearch, Kibana, Grafana.","sameAs":["http:\/\/NurullahCAKIR"],"url":"https:\/\/dbtut.com\/index.php\/author\/dbtut\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/posts\/10490","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/comments?post=10490"}],"version-history":[{"count":0,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/posts\/10490\/revisions"}],"wp:attachment":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/media?parent=10490"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/categories?post=10490"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/tags?post=10490"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}