Table of Contents
SQLSERVER到底能识别多少个逻辑CPU?
Home Database Mysql Tutorial SQLSERVER到底能识别多少个逻辑CPU?

SQLSERVER到底能识别多少个逻辑CPU?

Jun 07, 2016 pm 03:45 PM
cpu sqlserver How many identify logic

SQLSERVER到底能识别多少个逻辑CPU? 前言 在前几天在论坛有人遇到SQLSERVER识别逻辑CPU的问题 帖子地址: http://social.technet.microsoft.com/Forums/zh-CN/f8235ab2-4e46-4aea-81da-699d84b3b57b/sql-server-2005- http://social.technet.microsoft.com/F

SQLSERVER到底能识别多少个逻辑CPU?

前言

在前几天在论坛有人遇到SQLSERVER识别逻辑CPU的问题

帖子地址:

http://social.technet.microsoft.com/Forums/zh-CN/f8235ab2-4e46-4aea-81da-699d84b3b57b/sql-server-2005-

http://social.technet.microsoft.com/Forums/zh-CN/6fd788d3-014e-44bc-99f3-b962f4f041c7/sql-server-2005-x64-sp4-


环境

LZ当时的环境是这样的:

操作系统:Windows Server 2008 R2 企业版 SP1

高可用配置:群集

数据库:SQLSERVER 2005 企业版 64位  SP4 

服务器硬件配置:

CPU:HP DL980 G7 4*10核心 2.00 G主频  有超线程功能

内存:256GB


SQLSERVER的情况

LZ当时描述说:他当时开启了超线程

操作系统能识别得到80个逻辑CPU(在任务管理器里看)

SQLSERVER到底能识别多少个逻辑CPU?

如果操作系统能识别80个逻辑CPU表明:

4颗10核2.00处理器 ,每核心双线程(4*10*2=80),也就是80个逻辑处理器(每个线程代表一个逻辑CPU)

或者

4颗10核2.00处理器 ,每核心一个线程,但是使用了超线程技术之后变为每核心双线程(4*10*2=80),

也就是80个逻辑处理器(每个线程代表一个逻辑CPU)

 

LZ说:在sql server 2005中数据库属性处理器一项中只能识别cpu0-cpu59,并且群集切换后,另一台接管资源节点只能识别到20颗逻辑处理器。

只能识别到60个逻辑CPU

SQLSERVER到底能识别多少个逻辑CPU?


论坛说法

而在帖子中两位大侠都给出了各自的说法:

说法一:

当你在同一个集群上有多个SQLSERVER实例,最好把这些处理器划分开,供给多个实例使用。对于任何一个SQLSERVER实例

不能使用“自动设置所有处理器关联掩码”

SQLSERVER到底能识别多少个逻辑CPU?

rmiao大侠的意思是说,不能勾选“自动设置所有处理器的处理器关联掩码”,以防止集群的某一个实例将所有逻辑CPU资源都用尽了

 

说法二:

按照MSDN的说法,SQLSERVER2005企业版是支持操作系统最大处理器数目的

SQLSERVER到底能识别多少个逻辑CPU?

对于这个情况,怡红公子大侠给出了下面内容的链接:

64位的Windows7和Windows Server2008 R2为了能够在一台机器上,支持超过64个逻辑CPU ,引入了Process Group的概念

他会把一些逻辑CPU编成一个组,但是一个组内的逻辑CPU总数不能超过64个,否则将编入另外一个组

而且,分配逻辑CPU的工作也不一定是平均的。操作系统会在重启的时候,根据逻辑CPU之间的物理远近,自动进行编组。

例如,重启后可能变成20或者60核。

由于Process Group这个概念是在Windows2008才引入的。当开发SQLSERVER2008的时候, 并没有做相应的变化,

所以SQLSERVER2008是无法支持这个功能的。升级到SQLSERVER2008 R2就可以解决这个问题。

他最多可以同时检测到256个逻辑CPU。

如果不能升级到SQLSERVER2008 R2的话,可以人工干预Process Group的编组, 把第一个Process Group设置为64核,

以尽可能多的利用CPU,不过操作系统必须是64位Windows2008R2或64位Windows7或以上操作系统才能手工设置

关于如何设置Process Group编组,具体可以参考:http://support.microsoft.com/kb/2506384/zh-cn

 


翻译

我翻译了一下如何设置Process Group编组这篇文章

 

标题:如何在多处理器机器上手工设置处理器编组

概述

处理器编组的手动设置分配是在64位操作系统Windows Server 2008 R2开始的,并且应用在

超过64个逻辑CPU的NUMA(非统一内存架构)架构系统上。处理器编组设置允许

administrator系统管理员为处理器编组指定一个静态的NUMA节点,这样比让Windows在开机启动的时候动态

分配NUMA节点给处理器编组要好

 

注意:OEM厂商可以在OEM系统出厂之前为系统配置最优化的处理器编组

 

更多信息

在以前缺少手工设置处理器编组的时候,Windows以最小的编组的方式分配NUMA节点到编组里面。

Windows以自身的经验评估从之前启动时最小节点距离去分配每个处理器编组之间内部的节点距离。

administrator系统管理员可以使用以下两个方法的其中一个去重置自动编组分配:

第一个使用BCDEdit

第二个使用修改注册表

 

注意:Windows Server2008R2 使用下面的重置优先级:

手工修改注册表的优先级大于重置BCDEdit设置;然后,BCDEdit设置会覆盖操作系统的自动编组分配

也就是说优先级依次是:手工修改注册表>BCDEdit设置>操作系统的自动编组分配

 

使用 BCDEdit去配置编组分配

administrator系统管理员能够利用BCDEdit去覆盖掉默认编组分配,BCDEdit允许改变编组的大小和最大编组。

这个设置方法你可以在MSDN里的“修改操作系统启动参数去驱动测试多处理器编组支持”文章找到

文章地址:http://msdn.microsoft.com/en-us/library/ff542298(VS.85).aspx

相关命令:

<span> 1</span> <span>--</span><span>设置最大编组大小 </span>
<span> 2</span> bcdedit.exe <span>/</span><span>set</span><span> groupsize maxsize 
</span><span> 3</span> <span>--</span><span>设置一个编组内只能有2个逻辑处理器 </span>
<span> 4</span> bcdedit.exe <span>/</span><span>set</span> groupsize <span>2</span> 
<span> 5</span> <span>--</span><span>还原为默认的编组大小</span>
<span> 6</span>  bcdedit.exe <span>/</span><span>deletevalue groupsize 
</span><span> 7</span> <span>--</span><span>开启最大化编组大小 </span>
<span> 8</span> bcdedit.exe <span>/</span><span>set</span> maxgroup <span>on</span> 
<span> 9</span> <span>--</span><span>关闭最大化编组大小 </span>
<span>10</span> bcdedit.exe <span>/</span><span>set</span> maxgroup <span>off</span>
<span>11</span> 
<span>12</span> bcdedit.exe <span>/</span><span>set</span> groupaware <span>on</span> 
<span>13</span> bcdedit.exe <span>/</span><span>set</span> groupaware <span>off</span>
Copy after login


使用手工修改注册表去配置处理器编组

第二个手工配置处理器编组的方法就是通过根据特定系统的首选NUMA特征去添加注册表参数

<span>1</span> <span>Key</span><span>:  HKLM\System\CurrentControlSet\Control\NUMA 
</span><span>2</span> 
<span>3</span> Value: “<span>Group</span><span> Assignment” 
</span><span>4</span> 
<span>5</span> Type:  REG_BINARY
Copy after login


在注册表的HKLM\System\CurrentControlSet\Control位置添加新建NUMA项目

在NUMA项目里新建二进制值Group Assignment

而内容为:  

Proximity Domain Count (N)  

Proximity ID of domain 0  

Group assignment for domain 0  

Proximity ID of domain 1  

Group assignment for domain 1   ...  

Proximity ID of domain N-1  

Group assignment for domain N-1

内容里的值是一系列的ULONG数据类型的值(4字节 unsigned 整型)

SQLSERVER到底能识别多少个逻辑CPU?

SQLSERVER到底能识别多少个逻辑CPU?

 

Boot System Processor (BSP) :一个系统中有多个逻辑CPU的时候,当操作系统启动的时候只会

利用到一个逻辑CPU 其他的逻辑CPU在操作系统启动的时候是不活动的,这个逻辑CPU称为Boot System Processor (BSP)

 

重要:确保分配亲近的域包含BSP到组0。Windows确保BSP有组掩码(组0,号码0)

 

 

场景

例如,考虑下面的场景, 一个机器有80个逻辑处理器平均分配到4个NUMA节点当中, 电脑的BIOS资源掩码表(SRAT)

定义了NUMA节点与ID亲近:0x11, 0x12, 0x13, 0x14. 用于系统启动的那个逻辑CPU(BSP)与域 0x11亲近

下面是两个描述了如何去手动分配节点的场景 例子1:

你希望分配节点0x11 和 0x12 到编组0, 然后 节点0x13 和 0x14 到编组 1.

准备下面的表:

SQLSERVER到底能识别多少个逻辑CPU?

 

注意:你必须分配亲近域 ID 0x11 到编组0 因为域 ID 0x11 包含了 BSP.

根据上面这个表去配置注册表,从最右面的列(Value as ULONG)连接所有的4字节ULONG类型值到一个单一的long类型二进制制。

运行下面的脚本 ,将他保存为bat文件,然后双击运行

<span>1</span> reg.exe <span>add</span> HKLM\System\CurrentControlSet\Control\NUMA <span>/</span>v "<span>Group</span> Assignment" <span>/</span>t REG_BINARY <span>/</span>f <span>/</span>d "<span>040000001100000000000000120000000000000013000000010000001400000001000000</span>"
Copy after login


 

SQLSERVER到底能识别多少个逻辑CPU?

 

导入成功

SQLSERVER到底能识别多少个逻辑CPU?

 

例子2: 你希望配置节点0x11 和 0x12 到编组 0, 节点 0x13 到编组 1, 然后节点 0x14 到编组 2.

例子2跟例子1是差不多的,这里就不翻译了

重启电脑配置就会生效。如果配置不正确(数据内容长度错误,亲近IDs不对,或者定义了不合法的编组),手工编组分配就会被忽略,

启动机器时不会按照编组分配定义那样去分配编组

 

完成了手工编组分配之后,重启计算机,有两种方法验证目标机器的NUMA配置编组分配是否被正确应用

方法一:使用Perfmon(性能监视器)添加计数器,选择“处理器信息”计数器,查看传输的元祖(NUMA节点,看处理器在零基线里)

这里只会显示有多少节点展现出来,和在每个节点里有多少处理器

方法二::使用任务管理器,使用这个方法,你能看到节点与编组的映射。选择处理器选项卡, 右击每个处理器,

选择“设置掩码。。。”,然后查看哪些节点在哪个编组。这里会显示每个编组都有哪些节点

 


总结

按照上面那篇文章所说的,那么msdn上说的“SQLSERVER2005企业版是支持操作系统最大处理器数目的” 不是很正确

SQLSERVER到底能识别多少个逻辑CPU?

 

 

最后,个人感觉说法二比较靠谱一些,大家认为呢?

 

补充:

http://blogs.msdn.com/b/psssql/archive/2009/06/16/sql-server-on-windows-7-windows-2008-r2-with-more-than-64-cpus.aspx

http://blogs.msdn.com/b/manisblog/archive/2007/09/17/scale-up-with-sql-server-2005-sql-server-2008-numa.aspx

http://blogs.msdn.com/b/psssql/archive/2008/01/24/how-it-works-sql-server-2005-numa-basics.aspx

 

---------------------------------------------------------------------

2013-9-16补充:

最后LZ的解决了问题,大家可以参考下面这篇文章

http://blogs.msdn.com/b/apgcdsd/archive/2011/09/05/windows-2008-r2-sql-server-2008-cpu.aspx

如有不对的地方,欢迎大家拍砖o(∩_∩)o

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Two Point Museum: All Exhibits And Where To Find Them
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to solve the problem that the object named already exists in the sqlserver database How to solve the problem that the object named already exists in the sqlserver database Apr 05, 2024 pm 09:42 PM

For objects with the same name that already exist in the SQL Server database, the following steps need to be taken: Confirm the object type (table, view, stored procedure). IF NOT EXISTS can be used to skip creation if the object is empty. If the object has data, use a different name or modify the structure. Use DROP to delete existing objects (use caution, backup recommended). Check for schema changes to make sure there are no references to deleted or renamed objects.

How to import mdf file into sqlserver How to import mdf file into sqlserver Apr 08, 2024 am 11:41 AM

The import steps are as follows: Copy the MDF file to SQL Server's data directory (usually C:\Program Files\Microsoft SQL Server\MSSQL\DATA). In SQL Server Management Studio (SSMS), open the database and select Attach. Click the Add button and select the MDF file. Confirm the database name and click the OK button.

What to do if the sqlserver service cannot be started What to do if the sqlserver service cannot be started Apr 05, 2024 pm 10:00 PM

When the SQL Server service fails to start, here are some steps to resolve: Check the error log to determine the root cause. Make sure the service account has permission to start the service. Check whether dependency services are running. Disable antivirus software. Repair SQL Server installation. If the repair does not work, reinstall SQL Server.

144-core, 3D-stacked SRAM: Fujitsu details next-generation data center processor MONAKA 144-core, 3D-stacked SRAM: Fujitsu details next-generation data center processor MONAKA Jul 29, 2024 am 11:40 AM

According to news from this website on July 28, foreign media TechRader reported that Fujitsu introduced in detail the FUJITSU-MONAKA (hereinafter referred to as MONAKA) processor planned to be shipped in 2027. MONAKACPU is based on the "cloud native 3D many-core" architecture and adopts the Arm instruction set. It is oriented to the data center, edge and telecommunications fields. It is suitable for AI computing and can realize mainframe-level RAS1. Fujitsu said that MONAKA will achieve a leap in energy efficiency and performance: thanks to technologies such as ultra-low voltage (ULV) technology, the CPU can achieve 2 times the energy efficiency of competing products in 2027, and cooling does not require water cooling; in addition, the application performance of the processor It can also reach twice as much as your opponent. In terms of instructions, MONAKA is equipped with vector

Leak reveals key specs of Intel Arrow Lake-U, -H, -HX and -S Leak reveals key specs of Intel Arrow Lake-U, -H, -HX and -S Jun 15, 2024 pm 09:49 PM

IntelArrowLakeisexpectedtobebasedonthesameprocessorarchitectureasLunarLake,meaningthatIntel'sbrandnewLionCoveperformancecoreswillbecombinedwiththeeconomicalSkymontefficiencycores.WhileLunarLakeisonlyavailableasava

How to check sqlserver port number How to check sqlserver port number Apr 05, 2024 pm 09:57 PM

To view the SQL Server port number: Open SSMS and connect to the server. Find the server name in Object Explorer, right-click it and select Properties. In the Connection tab, view the TCP Port field.

AM4 refuses to die, news says AMD will launch Ryzen 9 5900XT/7 5800XT: clocked at up to 4.8GHz AM4 refuses to die, news says AMD will launch Ryzen 9 5900XT/7 5800XT: clocked at up to 4.8GHz Jun 05, 2024 pm 09:43 PM

According to news from this website on June 1st, the source @CodeCommando tweeted today, sharing some screenshots of AMD’s upcoming presentation documents at the Computex2024 event. The content of the tweet was “AM4 will never die”, and the accompanying picture showed two new Ryzen5000XT series processors. The screenshots show the following two products: Ryzen 95900 Ryzen75800XT It is a faster variant of AMD's existing Ryzen75800X processor. Both processors are clocked up to 4.8G

How to recover accidentally deleted database in sqlserver How to recover accidentally deleted database in sqlserver Apr 05, 2024 pm 10:39 PM

If you accidentally delete a SQL Server database, you can take the following steps to recover: stop database activity; back up log files; check database logs; recovery options: restore from backup; restore from transaction log; use DBCC CHECKDB; use third-party tools. Please back up your database regularly and enable transaction logging to prevent data loss.

See all articles