SQL Server on linux performance best practise PROCESS AFFINITY

sakuraime 2,326 Reputation points
2020-10-30T02:28:31.193+00:00

I am wondering the purpose of setting PROCESS AFFINITY in SQL Server on linux
https://learn.microsoft.com/en-us/sql/linux/sql-server-linux-performance-best-practices?view=sql-server-ver15

It ask me to set the PROCESS AFFINITY

Here is the option we have to set the process_affinity . But which option is the best practise ? CPU= Auto ??? CPU_RANGE??? For example linux server has 8 CPU logical cores. ... what's the configuration best practise should be?

<process_affinity> ::=
PROCESS AFFINITY
{
CPU = { AUTO | <CPU_range_spec> }
| NUMANODE = <NUMA_node_range_spec>
}
<CPU_range_spec> ::=
{ CPU_ID | CPU_ID TO CPU_ID } [ ,...n ]

<NUMA_node_range_spec> ::=
{ NUMA_node_ID | NUMA_node_ID TO NUMA_node_ID } [ ,...n ]

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,662 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. m 4,271 Reputation points
    2020-10-30T05:42:26.817+00:00

    Hi @sakuraime ,

    ...But which option is the best practise ? CPU= Auto ??? CPU_RANGE??? For example linux server has 8 CPU logical cores. ... what's the configuration best practise should >be?

    Best practise: CPU= Auto

    AUTO
    Specifies that no thread is assigned a CPU. The operating system can freely move threads among CPUs based on the server workload. This setting is the default and is recommended.

    BR,
    Mia


    If the answer is helpful, please click "Accept Answer" and upvote it.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.