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

Processor Affinity Expand / Collapse
Author
Message
Posted Wednesday, May 21, 2014 8:15 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Today @ 4:00 AM
Points: 12, Visits: 383
We need to limit the number of CPUs available to SQL on a server. There are 4 x 6 core processors and we want to go 24 to 20. This is not possible via the BIOS options. I was wondering about using Processor Affinity in order to do this but I have concerns. In SQL 2005 and above they split the affinities between I/O and CPU and they should be mutually exclusive. In SQL 2000 there is only the one affinty mask option so do we risk contention between I/O and CPU threads?

Basically, is this a feasible approach?
Post #1573197
Posted Wednesday, May 21, 2014 8:20 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Today @ 4:00 AM
Points: 12, Visits: 383
PS, we are going to be upgrading this server but the planning is likely to take months, this used to be the most important server in the company and has loads of legacy stuff on it!
Post #1573202
Posted Thursday, May 22, 2014 10:01 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Friday, September 19, 2014 2:46 AM
Points: 2,879, Visits: 3,229
Another way to limit CPUs is to use the Windows NUMPROC boot-time option. This limits the number of processor cores presented within Windows. If you use NUMPROC 20 on a 24-core server you are effectively turning it into a 20-core server.

There is some advice about using processor affinity to separate IO and CPU usage. Some configurations can boos performance, but if you get the balance wrong then affinity may not help you.

Also it is worth being aware that prior to Windows 2012, all IO activity is scheduled via core 0 on each CPU chip. If you do set affinity, then do not try to make core 0 set for CPU use only, as it will get some IO load regardless. With Windows 2012 and above, IO can be scheduled by any core.


Original author: SQL Server FineBuild 1-click install and best practice configuration of SQL Server 2014, 2012, 2008 R2, 2008 and 2005. 28 July 2014: now over 30,000 downloads.
Disclaimer: All information provided is a personal opinion that may not match reality.
Concept: "Pizza Apartheid" - the discrimination that separates those who earn enough in one day to buy a pizza if they want one, from those who can not.
Post #1573657
Posted Friday, May 23, 2014 12:42 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Today @ 4:00 AM
Points: 12, Visits: 383
Thank you, we are going to use the processor affinity option but you make a very interesting point about not using processor 0, I will change our change request accordingly.
Post #1573895
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse