SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Processor Affinity


Processor Affinity

Author
Message
neillewis
neillewis
Valued Member
Valued Member (58 reputation)Valued Member (58 reputation)Valued Member (58 reputation)Valued Member (58 reputation)Valued Member (58 reputation)Valued Member (58 reputation)Valued Member (58 reputation)Valued Member (58 reputation)

Group: General Forum Members
Points: 58 Visits: 388
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?
neillewis
neillewis
Valued Member
Valued Member (58 reputation)Valued Member (58 reputation)Valued Member (58 reputation)Valued Member (58 reputation)Valued Member (58 reputation)Valued Member (58 reputation)Valued Member (58 reputation)Valued Member (58 reputation)

Group: General Forum Members
Points: 58 Visits: 388
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!
EdVassie
EdVassie
SSChampion
SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)

Group: General Forum Members
Points: 14603 Visits: 3904
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 2017 2016, 2014, 2012, 2008 R2, 2008 and 2005. 14 Mar 2017: now over 40,000 downloads.Disclaimer: All information provided is a personal opinion that may not match reality.Quote: When I give food to the poor they call me a saint. When I ask why they are poor they call me a communist. - Archbishop Hélder Câmara
neillewis
neillewis
Valued Member
Valued Member (58 reputation)Valued Member (58 reputation)Valued Member (58 reputation)Valued Member (58 reputation)Valued Member (58 reputation)Valued Member (58 reputation)Valued Member (58 reputation)Valued Member (58 reputation)

Group: General Forum Members
Points: 58 Visits: 388
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.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search