AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / dba / 问题 / 52976
Accepted
Kin Shah
Kin Shah
Asked: 2013-11-08 12:40:43 +0800 CST2013-11-08 12:40:43 +0800 CST 2013-11-08 12:40:43 +0800 CST

sql server NUMA绑定到端口

  • 772

我正在尝试在 2 节点 NUMA 服务器上分配一组 CPU,如下所示:

以下来自 coreinfo,显示了服务器上的物理处理器、逻辑处理器和 NUMA 节点。

Logical to Physical Processor Map:
**--------------  Physical Processor 0 (Hyperthreaded)
--**------------  Physical Processor 1 (Hyperthreaded)
----**----------  Physical Processor 2 (Hyperthreaded)
------**--------  Physical Processor 3 (Hyperthreaded)
--------**------  Physical Processor 4 (Hyperthreaded)
----------**----  Physical Processor 5 (Hyperthreaded)
------------**--  Physical Processor 6 (Hyperthreaded)
--------------**  Physical Processor 7 (Hyperthreaded)

Logical Processor to Socket Map:
********--------  Socket 0
--------********  Socket 1

Logical Processor to NUMA Node Map:
********--------  NUMA Node 0
--------********  NUMA Node 1

我正在运行 2 个 sql server 2008R2 标准版实例。

我所做的是:

将NODE 0 绑定到实例 1。因此实例1将有 8 个逻辑处理器。

ALTER SERVER CONFIGURATION SET PROCESS AFFINITY NUMANODE = 0
GO

2013-11-07 13:01:20.79 Server      Processor affinity turned on: node 0, processor mask 0x00000000000000ff. Threads will execute on CPUs per affinity settings. This is an informational message; no user action is required.
2013-11-07 13:01:20.79 Server      Processor affinity turned on: node 1, processor mask 0x0000000000000000. Threads will execute on CPUs per affinity settings. This is an informational message; no user action is required.
2013-11-07 13:01:20.82 Server      Using dynamic lock allocation.  Initial allocation of 2500 Lock blocks and 5000 Lock Owner blocks per node.  This is an informational message only.  No user action is required.
2013-11-07 13:01:20.82 Server      Lock partitioning is enabled.  This is an informational message only. No user action is required.
2013-11-07 13:01:20.83 Server      Node configuration: node 0: CPU mask: 0x00000000000000ff:0 Active CPU mask: 0x00000000000000ff:0. This message provides a description of the NUMA configuration for this computer. This is an informational message only. No user action is required.
2013-11-07 13:01:20.83 Server      Node configuration: node 1: CPU mask: 0x000000000000ff00:0 Active CPU mask: 0x0000000000000000:0. This message provides a description of the NUMA configuration for this computer. This is an informational message only. No user action is required.

我可以看到实例 1 能够监听 NODE 0,如下所示:

2013-11-07 13:01:21.05 服务器 SQL Server 网络接口在节点关联掩码 0x0000000000000001 的多节点 (NUMA) 服务器配置的节点 0 上初始化侦听器。这只是一条信息性消息。无需用户操作。

现在在实例 2 上:

将NODE 1 绑定到实例 2。因此实例2将有 8 个逻辑处理器。

ALTER SERVER CONFIGURATION SET PROCESS AFFINITY NUMANODE = 1
GO

错误日志也证实了这一点:

2013-11-07 13:03:51.16 Server      Detected 16 CPUs. This is an informational message; no user action is required.
2013-11-07 13:03:51.49 Server      Processor affinity turned on: node 0, processor mask 0x000000000000ff00. Threads will execute on CPUs per affinity settings. This is an informational message; no user action is required.
2013-11-07 13:03:51.49 Server      Processor affinity turned on: node 1, processor mask 0x0000000000000000. Threads will execute on CPUs per affinity settings. This is an informational message; no user action is required.
2013-11-07 13:03:51.52 Server      Using dynamic lock allocation.  Initial allocation of 2500 Lock blocks and 5000 Lock Owner blocks per node.  This is an informational message only.  No user action is required.
2013-11-07 13:03:51.52 Server      Lock partitioning is enabled.  This is an informational message only. No user action is required.
2013-11-07 13:03:51.53 Server      Node configuration: node 0: CPU mask: 0x000000000000ff00:0 Active CPU mask: 0x000000000000ff00:0. This message provides a description of the NUMA configuration for this computer. This is an informational message only. No user action is required.
2013-11-07 13:03:51.53 Server      Node configuration: node 1: CPU mask: 0x00000000000000ff:0 Active CPU mask: 0x0000000000000000:0. This message provides a description of the NUMA configuration for this computer. This is an informational message only. No user action is required.

但是为什么 INSTANCE2 监听 NUMA 0 而不是 NUMA 1 呢?

两个实例都将 MAXDOP 设置为 4。

2013-11-07 13:03:51.78 服务器 SQL Server 网络接口在节点关联掩码 0x0000000000000001 的多节点 (NUMA) 服务器配置的节点 0 上初始化侦听器。这只是一条信息性消息。无需用户操作。

此外,以下是我的 TCP/IP 设置:

在此处输入图像描述

在此处输入图像描述

笔记:

我也尝试过以下事情:

  1. 先关闭 CPU 亲和力,然后绑定端口,看看是否有效。这工作正常,我能够看到 NUMA 0 在一个端口上侦听,NUMA 1 在第二个端口上侦听。这就是我想要的,但我不想关闭 CPU Affinity。我的方向正确吗?

  2. CPU 亲和力开启。尝试 NUMA 分配给端口。这在实例 1 绑定到 NUMA 0 并且实例 2 未在错误日志中显示它正在侦听 NUMA 1 的意义上不起作用。

谢谢 !

sql-server-2008-r2
  • 1 1 个回答
  • 597 Views

1 个回答

  • Voted
  1. Best Answer
    Jonathan Kehayias
    2013-11-08T17:41:03+08:002013-11-08T17:41:03+08:00

    由于您已经使用 ALTER SERVER CONFIGURATION 将每个实例关联到一个 NUMA 节点,这就是您需要做的全部,并且此设置不需要端口映射。不需要它的原因是实例只能将任务分配给 ONLINE 节点,并且因为每个实例只有一个 ONLINE 节点,所有任务都必须作为实例的 CPU 关联的一部分分配。在 Soft NUMA 中,您可以在各个实例中进一步细分和隔离,但我认为根本没有理由这样做。

    • 3

相关问题

  • SQL Server 2008 R2 中的自动收缩、加密和恢复模型属性

  • SQL Server 2008 R2 群集的无人参与安装失败并出现错误 - “路径中有非法字符”。

  • 迁移大型数据库

  • 代理执行的维护计划

  • 随机化表内容并将它们存储回表中

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何让sqlplus的输出出现在一行中?

    • 3 个回答
  • Marko Smith

    选择具有最大日期或最晚日期的日期

    • 3 个回答
  • Marko Smith

    如何列出 PostgreSQL 中的所有模式?

    • 4 个回答
  • Marko Smith

    授予用户对所有表的访问权限

    • 5 个回答
  • Marko Smith

    列出指定表的所有列

    • 5 个回答
  • Marko Smith

    如何在不修改我自己的 tnsnames.ora 的情况下使用 sqlplus 连接到位于另一台主机上的 Oracle 数据库

    • 4 个回答
  • Marko Smith

    你如何mysqldump特定的表?

    • 4 个回答
  • Marko Smith

    使用 psql 列出数据库权限

    • 10 个回答
  • Marko Smith

    如何从 PostgreSQL 中的选择查询中将值插入表中?

    • 4 个回答
  • Marko Smith

    如何使用 psql 列出所有数据库和表?

    • 7 个回答
  • Martin Hope
    Stéphane 如何列出 PostgreSQL 中的所有模式? 2013-04-16 11:19:16 +0800 CST
  • Martin Hope
    Mike Walsh 为什么事务日志不断增长或空间不足? 2012-12-05 18:11:22 +0800 CST
  • Martin Hope
    Stephane Rolland 列出指定表的所有列 2012-08-14 04:44:44 +0800 CST
  • Martin Hope
    haxney MySQL 能否合理地对数十亿行执行查询? 2012-07-03 11:36:13 +0800 CST
  • Martin Hope
    qazwsx 如何监控大型 .sql 文件的导入进度? 2012-05-03 08:54:41 +0800 CST
  • Martin Hope
    markdorison 你如何mysqldump特定的表? 2011-12-17 12:39:37 +0800 CST
  • Martin Hope
    pedrosanta 使用 psql 列出数据库权限 2011-08-04 11:01:21 +0800 CST
  • Martin Hope
    Jonas 如何使用 psql 对 SQL 查询进行计时? 2011-06-04 02:22:54 +0800 CST
  • Martin Hope
    Jonas 如何从 PostgreSQL 中的选择查询中将值插入表中? 2011-05-28 00:33:05 +0800 CST
  • Martin Hope
    Jonas 如何使用 psql 列出所有数据库和表? 2011-02-18 00:45:49 +0800 CST

热门标签

sql-server mysql postgresql sql-server-2014 sql-server-2016 oracle sql-server-2008 database-design query-performance sql-server-2017

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve