Databases Reference
In-Depth Information
Finally, the value of @Workload_GroupName , which will be the workload group to which the
classifier function will route the current request, is returned.
Thus, if a request comes from the web application, the request will be routed to the
rg_WebApp workload group and the rp_WebApp resource pool will be used. If the request
comes from the reporting application, the request will be routed to the rg_ReportApp
workload group and the rp_ReportApp resource pool will be used. As both resource pools
specify the limit on resources, SQL Server manages resource allocation accordingly, in case
of resource contention. This will guarantee that the web application will get its allocated
50 percent of CPU and memory resources, even if the reporting application executes heavy
and long-running queries. Also, if there is no resource contention, the application will not be
limited to using only 50 percent of the available resources.
Remember that you may frequently see requests consuming more
resources than what they have been assigned by a resource pool. This is
normal behaviour and can happen when there is no resource contention
(no other requests are executing) at the time of executing a request.
After creating the classifier function dbo.RGClassifier() , we open the Resource
Governor Properties dialog box by right-clicking the Resource Governor node in Object
Explorer and choosing Properties. There, we enable the Resource Governor and specify
dbo.RGClassifier() as our classifier function.
Enabling Resource Governor
By default, Resource Governor is disabled. In order to work with Resource
Governor, you must enable it. You can enable Resource Governor from
the Resource Governor Properties dialog box in SSMS or by executing
the ALTER RESOURCE GOVERNOR RECONFIGURE command as well.
In the Resource Governor Properties dialog box, we first created the rp_WebApp resource
pool, and the rg_WebApp workload group under this resource pool, by assigning a minimum
of 50 percent of CPU and memory resources to be used by the web application.
We then created the rp_ReportApp resource pool, and the rg_ReportApp workload group
under this resource pool, by assigning a minimum of 25 percent of CPU and memory
resources to be used by the reporting application.
Requests that are not routed to any specific workload group are always
routed to the default workload group and use the default resource pool.
Internal system requests generated by SQL Server are routed to the
internal workload group and use the internal resource pool.
Also, remember that a Dedicated Administrator Connection (DAC) is not
affected by Resource Governor Classification.
 
Search WWH ::




Custom Search