Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between processor affinity and I/O affinity

I am preparing for a certification and trying to know the difference between processor affinity and I/O affinity. Would be thankful if someone could explain that to me in simple words.. Tried to learn about it on MS links, but got confused. Many thanks

like image 691
user2438237 Avatar asked Jul 12 '14 18:07

user2438237


1 Answers

Well I am no DBA but as far I understand, SQL Server runs on multiple thread (spawns multiple thread for serving request) being a multi threaded application.

You can specify/Map a particular thread(s) to work on specific CPU(s) (since high end server machines will run on 16 or more CPU). that is known as Processor Affinity.

Whereas, The affinity I/O mask or I/O Affinity option binds SQL Server disk I/O to a specified subset of CPU(s)

From MSDN Documentation, specific excerpt

To carry out multitasking, Microsoft Windows 2000 and Windows Server 2003 sometimes move process threads among different processors. Although efficient from an operating system point of view, this activity can reduce Microsoft SQL Server performance under heavy system loads, as each processor cache is repeatedly reloaded with data. Assigning processors to specific threads can improve performance under these conditions by eliminating processor reloads; such an association between a thread and a processor is called processor affinity.

SQL Server supports processor affinity by means of two affinity mask options: affinity mask (also known as CPU affinity mask) and affinity I/O mask

like image 56
Rahul Avatar answered Sep 28 '22 18:09

Rahul