Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

MAXDOP settings for OLAP Expand / Collapse
Author
Message
Posted Tuesday, May 14, 2013 7:27 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Wednesday, September 24, 2014 11:14 AM
Points: 177, Visits: 411

Hello,

Does anyone have any idea what is the better way to set MAXOP settings for OLAP system. Here is my environment info:

SQLServer: 2008 R2
LOGICAL CPU Count: 40
Hyperthread ration : 10
Physical CPU Count : 4
Physical memory : 260 GB

I have seen one of the forumale and not so sure is this right setting:

--MAX DEGREE OF PARALLELISM FORUMLAE
--'4' NUMBER OF PROCESSESSORS- 4/2 = 2

select
case
when cpu_count / hyperthread_ratio > 2 then 2
else cpu_count / hyperthread_ratio
end as optimal_maxdop_setting
from sys.dm_os_sys_info;


O/P: 2



--Another formulae:
declare @hyperthreadingRatio bit
declare @logicalCPUs int
declare @HTEnabled int
declare @physicalCPU int
declare @SOCKET int
declare @logicalCPUPerNuma int
declare @NoOfNUMA int

select @logicalCPUs = cpu_count -- [Logical CPU Count]
,@hyperthreadingRatio = hyperthread_ratio -- [Hyperthread Ratio]
,@physicalCPU = cpu_count / hyperthread_ratio -- [Physical CPU Count]
,@HTEnabled = case
when cpu_count > hyperthread_ratio
then 1
else 0
end -- HTEnabled
from sys.dm_os_sys_info
option (recompile);

select @logicalCPUPerNuma = COUNT(parent_node_id) -- [NumberOfLogicalProcessorsPerNuma]
from sys.dm_os_schedulers
where [status] = 'VISIBLE ONLINE'
and parent_node_id < 64
group by parent_node_id
option (recompile);

select @NoOfNUMA = count(distinct parent_node_id)
from sys.dm_os_schedulers -- find NO OF NUMA Nodes
where [status] = 'VISIBLE ONLINE'
and parent_node_id < 64

-- Report the recommendations ....
select
--- 8 or less processors and NO HT enabled
case
when @logicalCPUs < 8
and @HTEnabled = 0
then 'MAXDOP setting should be : ' + CAST(@logicalCPUs as varchar(3))
--- 8 or more processors and NO HT enabled
when @logicalCPUs >= 8
and @HTEnabled = 0
then 'MAXDOP setting should be : 8'
--- 8 or more processors and HT enabled and NO NUMA
when @logicalCPUs >= 8
and @HTEnabled = 1
and @NoofNUMA = 1
then 'MaxDop setting should be : ' + CAST(@logicalCPUPerNuma / @physicalCPU as varchar(3))
--- 8 or more processors and HT enabled and NUMA
when @logicalCPUs >= 8
and @HTEnabled = 1
and @NoofNUMA > 1
then 'MaxDop setting should be : ' + CAST(@logicalCPUPerNuma / @physicalCPU as varchar(3))
else ''
end as Recommendations



O/P: 2



Not so sure, are these correct or not. Need suggestions please. Thanks
Post #1452563
Posted Wednesday, May 15, 2013 12:40 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, June 4, 2014 12:11 PM
Points: 5, Visits: 254
Check out: [url=http://www.mssqltips.com/sqlservertip/2650/what-maxdop-setting-should-be-used-for-sql-server/][/url]
Post #1453253
Posted Thursday, May 16, 2013 5:14 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Wednesday, September 24, 2014 11:14 AM
Points: 177, Visits: 411
I have already gone through it. But, looking for OLAP settings only. Currently i am testing with my environment by increasing and decreasing values.
Post #1453812
Posted Thursday, May 16, 2013 5:55 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, June 4, 2014 12:11 PM
Points: 5, Visits: 254
Depends on how much concurrency you want to be able to support. Looking to load a lot of dimension tables simultaneously? Or are you looking just to run one massive process at a time?

Personally, I would follow the recommendations. Especially the NUMA related ones.

Do you realy want to allow a single process to take over the entire CPU power? Do want to spend a large chunk of time in CXPacket waits for little gain?

Parallelism should be the answer of last resort. Only after you have done everything else optimally should you be looking to parallelism to improve performance.
Post #1453815
Posted Thursday, May 23, 2013 10:36 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Wednesday, September 24, 2014 7:09 AM
Points: 30, Visits: 129
We have both OLAP and OLTP systems. Config looks around same for us too except double the memory and double the logical processes.

We set it to 1 in general and increase to 4 when we are creating bunch of indexes, or run update statistics etc.

But, you don't want it to be 0 for sure.
Post #1456093
Posted Friday, January 10, 2014 2:08 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Sunday, May 4, 2014 10:21 PM
Points: 199, Visits: 307
Just to note: SQL 2008 scheduler does not reguard NUMA for thread assignment in parallelism. The thread has a chance of running on the same node, or it may run on a seperate node. Linchi Shea had a pretty good article about this.

With that being said, Linchi also has a follow up article that states that it doesn't appear to make a big difference to performance relative to other performance isues.

I find it interesting that the last article mentions having SQL Server listener set up to listen on multiple ports. I've been doing some tinkering around with Soft NUMA. There does seem to be some benefits with creating affinity with multiple NICs listening on seperate subnets, each NIC affinitized to one core, and having SQL Server listener port mapped to the same core (soft NUMA), and loading tables in parallel for ETL. Basically Microsoft did a case study with this where they loaded 1Tb of data into SQL Server in about 30 mins using commodity class hardware.

However I would think such a configuration would be ultimately difficult to support in a production environment, as in order to make such a thing work correctly, you'd have to have soft NUMA set up (which isn't painless), then have the listener listen on seperate ports, one for each soft NUMA node affinitized to each physical NIC, affinitized to each CPU core. Then in your ETL package you'd have to use something like the Balanced Data Distributor and multiple connections to SQL Server set up on seperate NIC subnets on your SSIS machine to make sure the traffic gets split and evenly balanced down each parallel stream.

Then you'd have to have a set of NICs set up to listen on a single port configured on another subnet for all the NUMA nodes so you could properly manage end user requests or you risk overloading one of the soft NUMA nodes. I don't think you'd want to mess with using a load balancer to balance the request across the nodes respectively for end-user activity. At the end of the day, thats a lot of NICs going into SQL Server, and a lot of configuration to the SQL listener to map TCP ports to soft NUMA nodes, each soft NUMA node mapped to a CPU core... You see where I'm going with this. Configuration management becomes quite a nightmare.

Or you could just buy PDW 2012 and get all that out of the box... Choices choices.



Post #1529972
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse