之前写过一篇文章,关于SQLSERVER能识别多少个逻辑CPU的,前些天在论坛里有人问Windows处理器编组是如何划分的??
SQLSERVER到底能识别多少个逻辑CPU?
在帖子给出了两篇文章,我们现在来看一下
http://social.technet.microsoft.com/Forums/zh-CN/17f34500-08d5-4302-a484-3ce487899a83/windows-2008-r2sql-server-2005cpu?forum=sqlserverzhchs
Uneven Windows PRocessor Groups
SQL Server 2005 and 2008 versions may not detect all available processors on a machine with more than 64 logical processors
Uneven Windows Processor Groups(不均匀的处理器编组)
这篇文章主要讨论64个逻辑cpu的硬件。
我们讨论Windows 2008R2 他支持64个逻辑处理器。当前可用的硬件是8个核的物理处理器/socket接口。
尽管加上超线程,那么意味着是16个逻辑cpu。每一个socket接口形成一个或两个NUMA节点。4个或8个逻辑cpu形成一个处理器编组。
处理器编组的分配是在操作系统启动的时候分配好的。因为这个原因,Windows2008R2 和之后的Windows操作系统会检查物理硬件架构为了
分配跟NUMA节点相对应的处理器编组,并且检查内存延时,为了决定分配哪一个逻辑cpu到哪一个处理器编组。一旦分配完成,就不能再动态更改!
这样的分配工作只会发生在超过64个逻辑cpu的硬件架构。在典型的8-socket服务器,资源和内存的分布通常是不均匀的,在不同的处理器编组之间
(除了一些在2009年和2010年的时候一些市场上出现的96个逻辑cpu的奇怪的硬件)
已经开发好的软件面对处理器编组这个概念会发生什么?在大于64个逻辑cpu的时候,软件会怎样选择不同的逻辑处理器
实际上,Windows会在应用程序启动的时候分配其中一个处理器编组给它。应用程序会检查64逻辑cpu窗口是否在运行。
然而应用程序会检查完整的内存资源。典型的应用程序会被调度到其中一个处理器编组。
只要处理器编组有均匀的分布和软件不需要依赖某些NUMA节点的可用性,一切都很好。
然而,这个平衡受到英特尔发布的最新版本的Intel Xeon E7处理器核心家族的( 10和20逻辑处理器)的影响
显然,核心的数量和逻辑处理器的数量加起来不太好对于64核cpus。在我的博客里,我已经列出了我讨论的
处理器影响到SQLSERVER服务器关联掩码的设置。
到目前位置我们并没有讨论到Windows2008R2是如何分配4-socket服务器上的80个逻辑处理器或一个8-socket服务器上的160个逻辑处理器的情况。
Windows2008R2的原来算法实现就是创建尽可能少的处理器编组并且保持每个处理器编组里的处理器数量尽可能足够大。
因此我们使用这些新的10-core处理器最终会造成处理器编组的不均匀,让我们看看发生了什么事。
检测当前的处理器编组信息
为了检测Windows2008R2上面的确切的处理器编组的信息,硬件通常需要编出超过64个逻辑CPU的线程。执行检查的工具的名字叫“coreinfo ”
下载地址:http://technet.microsoft.com/en-us/sysinternals/cc835722.aspx
下载地址:http://files.cnblogs.com/lyhabc/Coreinfo.zip
请下载coreinfo .exe然后在cmd窗口里运行它。
最好使用下面语句将coreinfo的信息输出到文本文件以便分析
coreinfo > structure.txt
structure.txt文件内容
Intel(R) Pentium(R) CPU G630 @ 2.70GHzIntel64 Family 6 Model 42 Stepping 7, GenuineIntelHTT * Hyperthreading enabledHYPERVISOR - Hypervisor is presentVMX * Supports Intel hardware-assisted virtualizationSVM - Supports AMD hardware-assisted virtualizationEM64T * Supports 64-bit modeSMX - Supports Intel trusted executionSKINIT - Supports AMD SKINITNX * Supports no-execute page protectionSMEP - Supports Supervisor Mode Execution PreventionSMAP - Supports Supervisor Mode access PreventionPAGE1GB - Supports 1 GB large pagesPAE * Supports > 32-bit physical addressesPAT * Supports Page Attribute TablePSE * Supports 4 MB pagesPSE36 * Supports > 32-bit address 4 MB pagesPGE * Supports global bit in page tablesSS * Supports bus snooping for cache OperationsVME * Supports Virtual-8086 modeRDWRFSGSBASE - Supports direct GS/FS base accessFPU * Implements i387 floating point instructionsMMX * Supports MMX instruction setMMXEXT - Implements AMD MMX extensions3DNOW - Supports 3DNow! instructions3DNOWEXT - Supports 3DNow! extension instructionsSSE * Supports Streaming SIMD ExtensionsSSE2 * Supports Streaming SIMD Extensions 2SSE3 * Supports Streaming SIMD Extensions 3SSSE3 * Supports Supplemental SIMD Extensions 3SSE4a - Supports Sreaming SIMDR Extensions 4aSSE4.1 * Supports Streaming SIMD Extensions 4.1SSE4.2 * Supports Streaming SIMD Extensions 4.2AES - Supports AES extensionsAVX - Supports AVX intruction extensionsFMA - Supports FMA extensions using YMM stateMSR * Implements RDMSR/WRMSR instructionsMTRR * Supports Memory Type Range RegistersXSAVE * Supports XSAVE/XRSTOR instructionsOSXSAVE * Supports XSETBV/XGETBV instructionsRDRAND - Supports RDRAND instructionRDSEED - Supports RDSEED instructionCMOV * Supports CMOVcc instructionCLFSH * Supports CLFLUSH instructionCX8 * Supports compare and exchange 8-byte instructionsCX16 * Supports CMPXCHG16B instructionBMI1 - Supports bit manipulation extensions 1BMI2 - Supports bit manipulation extensions 2ADX - Supports ADCX/ADOX instructionsDCA - Supports prefetch from memory-mapped deviceF16C - Supports half-precision instructionFXSR * Supports FXSAVE/FXSTOR instructionsFFXSR - Supports optimized FXSAVE/FSRSTOR instructionMONITOR * Supports MONITOR and MWAIT instructionsMOVBE - Supports MOVBE instructionERMSB - Supports Enhanced REP MOVSB/STOSBPCLULDQ * Supports PCLMULDQ instructionPOPCNT * Supports POPCNT instructionLZCNT - Supports LZCNT instructionSEP * Supports fast system call instructionsLAHF-SAHF * Supports LAHF/SAHF instructions in 64-bit modeHLE - Supports Hardware Lock Elision instructionsRTM - Supports Restricted Transactional Memory instructionsDE * Supports I/O breakpoints including CR4.DEDTES64 * Can write history of 64-bit branch addressesDS * Implements memory-resident debug bufferDS-CPL * Supports Debug Store feature with CPLPCID * Supports PCIDs and settable CR4.PCIDEINVPCID - Supports INVPCID instructionPDCM * Supports Performance Capabilities MSRRDTSCP * Supports RDTSCP instructionTSC * Supports RDTSC instructionTSC-DEADLINE * Local APIC supports one-shot deadline timerTSC-INVARIANT * TSC runs at constant ratexTPR * Supports disabling task priority messagesEIST * Supports Enhanced Intel SpeedstepACPI * Implements MSR for power managementTM * Implements thermal monitor circuitryTM2 * Implements Thermal Monitor 2 controlAPIC * Implements software-accessible local APICx2APIC - Supports x2APICCNXT-ID - L1 data cache mode adaptive or BIOSMCE * Supports Machine Check, INT18 and CR4.MCEMCA * Implements Machine Check ArchitecturePBE * Supports use of FERR#/PBE# pinPSN - Implements 96-bit processor serial numberPREFETCHW * Supports PREFETCHW instructionMaximum implemented CPUID leaves: 0000000D (Basic), 80000008 (Extended).Logical to Physical Processor Map:*- Physical Processor 0-* Physical Processor 1Logical Processor to Socket Map:** Socket 0Logical Processor to NUMA Node Map:** NUMA Node 0Logical Processor to Cache Map:*- Data Cache 0, Level 1, 32 KB, Assoc 8, LineSize 64*- Instruction Cache 0, Level 1, 32 KB, Assoc 8, LineSize 64*- Unified Cache 0, Level 2, 256 KB, Assoc 8, LineSize 64-* Data Cache 1, Level 1, 32 KB, Assoc 8, LineSize 64-* Instruction Cache 1, Level 1, 32 KB, Assoc 8, LineSize 64-* Unified Cache 1, Level 2, 256 KB, Assoc 8, LineSize 64** Unified Cache 2, Level 3, 3 MB, Assoc 12, LineSize 64Logical Processor to Group Map:** Group 0View Code
打开文件,你会看到类似于下面的section ,通常结果是在最后一个section 。这个section 叫‘Logical Processor to Group Map’.
有80 逻辑cpu的机器的结果通常是这样:
The result of a server with 80 LOGICAL PROCESSOR threads might look
新闻热点
疑难解答