Using Resource Governor to resolve MaxDOP headaches?

  • So there's an application using one of my SQL servers. No big surprise there. However, the vendor suggests setting MaxDOP to 1 for their application. The problem is, they share this SQL server with quite a few other applications which don't have such a restriction.

    So, I've been off and on looking at possible solutions, and have come across a couple. Some which will require monitoring the server for a while to get a feel for the workloads, some which I could implement now and probably have little impact on the other apps.

    Option 1: Set MaxDOP on the server level. Bad for oh so many reasons. The impact on all the other applications for starts.

    Option 2: Increase Cost Threshold for Parallelism to something higher than 5. Not a bad solution, but I'll need to monitor workloads, etc for a while to find a happy value that works for the problem app, without causing angry users calling me for the other apps.

    Option 3: Get the vendor to put the MAXDOP= hint in their queries. While this is what I suggested to the vendor, and they may be looking into this, I'd probably have an easier time getting a 3yr old to eat their brocolli..

    Option 4: Use the Resource Governor, so that any connections by the login used by the problem app get fed into a resource pool that sets MAXDOP to 1, while all the other apps go into the default pool.

    Has anyone used RG for such a purpose? If so, how'd it work out?

    Thanks,

    Jason

  • Hello Jason,

    We had similar requirement where applications such as biztalk, sharepoint are restricted to use MAXDOP=1 but on a shared server there were many other applications too which were performing badly without parallelism. So we created a classifier function which segregated the workload depnding upon the login name, set MAXDOP=1 for workload group and routed all the incoming traffic from sharepoint and biztalk to this workload group. And we set Degree of parallelism to 0 at server level. During a month's testing it did not create any problem and we're looking move into production sooner with this setup.

    However, You need to be careful with what you use to classify the workload. For me database name is the best bet but you can't use DB_NAME() in classifier function so you need to rely on some other parameters like login name etc.

    Thanks!!

    -Yogeshwar

  • I would use resource governor, given that you can classify the incoming connections effectively.

    I would also raise the cost threshold fro parallelism to a value of 20/25. In my experience it's a good value to start from. If you see that parallelism still kicks in too often or not often enough, you can always tune it afterwards without the need to restart the instance.

    Hope this helps

    Gianluca

    -- Gianluca Sartori

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply