按 SQL Server 版本划分的计算能力限制Compute capacity limits by edition of SQL Server

适用于: 是SQL Server 否Azure SQL 数据库 否Azure Synapse Analytics (SQL DW) 否并行数据仓库 APPLIES TO: YesSQL Server NoAzure SQL Database NoAzure Synapse Analytics (SQL DW) NoParallel Data Warehouse

本文讨论不同 SQL Server 2019 (15.x)SQL Server 2019 (15.x) 版本的计算能力限制,以及在具有超线程处理器的物理和虚拟化环境中计算能力限制有何不同。This article discusses compute capacity limits for editions of SQL Server 2019 (15.x)SQL Server 2019 (15.x) and how they differ in physical and virtualized environments with hyperthreaded processors.

映射到计算能力限制Mappings to compute capacity limits

下表描述上图中的表示法:This table describes the notations in the preceding diagram:

Value 说明Description
0..10..1 零个或 1 个Zero or one
11 恰好一个Exactly one
1..*1..* 一个或更多One or more
0..*0..* 零个或更多Zero or more
1..21..2 1 个或 2 个One or two

重要

进一步详细阐述:To elaborate further:

  • 每个虚拟机 (VM) 有一个或多个虚拟处理器。A virtual machine (VM) has one or more virtual processors.
  • 一个或多个虚拟处理器被分配给恰好一个虚拟机。One or more virtual processors are allocated to exactly one virtual machine.
  • 零个或一个虚拟处理器映射到零个或多个逻辑处理器。Zero or one virtual processor is mapped to zero or more logical processors. 如果虚拟处理器到逻辑处理器的映射为:When the mapping of virtual processors to logical processors is:
    • 一对零,则表示来宾操作系统未使用未绑定的逻辑处理器。One to zero, it represents an unbound logical processor not used by the guest operating systems.
    • 一对多,则表示过度提交。One to many, it represents an overcommit.
    • 零对多,则表示主机系统上没有虚拟机。Zero to many, it represents the absence of virtual machine on the host system. 因此 VM 不使用任何逻辑处理器。So VMs don't use any logical processors.
  • 插槽映射到零个或多个内核。A socket is mapped to zero or more cores. 如果插槽到内核的映射为:When the socket-to-core mapping is:
    • 一对零,则表示一个空插槽。One to zero, it represents an empty socket. 未安装芯片。No chip is installed.
    • 一对一,则表示在插槽中安装了单核芯片。One to one, it represents a single-core chip installed in the socket. 这种映射现在已经非常罕见。This mapping is rare these days.
    • 一对多,则表示在插槽中安装了多核芯片。One to many, it represents a multi-core chip installed in the socket. 典型值为 2、4 或 8。Typical values are 2, 4, and 8.
  • 内核映射到一个或两个逻辑处理器。A core is mapped to one or two logical processors. 如果内核到逻辑处理器的映射为:When the mapping of cores to logical processors is:
    • 一对一,则超线程处于关闭状态。One to one, hyperthreading is off.
    • 一对二,则超线程处于打开状态。One to two, hyperthreading is on.

下列定义适用于本文中使用到的术语:The following definitions apply to the terms used in this article:

  • SQL ServerSQL Server、操作系统、应用程序或驱动程序的角度理解,线程或逻辑处理器是一种逻辑计算引擎。A thread or logical processor is one logical computing engine from the perspective of SQL ServerSQL Server, the operating system, an application, or a driver.

  • 内核是一个处理器单元。A core is a processor unit. 它可以包含一个或多个物理处理器。It can consist of one or more logical processors.

  • 物理处理器可包含一个或多个内核。A physical processor can consist of one or more cores. 物理处理器等同于处理器包或插槽。A physical processor is the same as a processor package or a socket.

具有多个物理处理器的系统或是具有含多个内核和/或超线程的物理处理器的系统,可支持操作系统同时执行多项任务。Systems with more than one physical processor or systems with physical processors that have multiple cores and/or hyperthreads enable the operating system to execute multiple tasks simultaneously. 每个执行线程都显示为一个逻辑处理器。Each thread of execution appears as a logical processor. 例如,如果计算机具有两个启用超线程的四核处理器,且每个内核两个线程,则有 16 个逻辑处理器:2 个处理器 x 每个处理器 4 个内核 x 每个内核 2 个线程。For example, if your computer has two quad-core processors with hyperthreading enabled and two threads per core, you have 16 logical processors: 2 processors x 4 cores per processor x 2 threads per core. 值得注意的是:It's worth noting that:

  • 来自超线程内核的单线程的逻辑处理器计算能力不及来自禁用超线程的同一内核的逻辑处理器计算能力。The compute capacity of a logical processor from a single thread of a hyperthreaded core is less than the compute capacity of a logical processor from that same core with hyperthreading disabled.

  • 超线程内核中两个逻辑处理器的计算能力超过了禁用超线程的同一内核的计算能力。The compute capacity of the two logical processors in the hyperthreaded core is greater than the compute capacity of the same core with hyperthreading disabled.

每个 SQL ServerSQL Server 版本都有以下两种计算能力限制:Each edition of SQL ServerSQL Server has two compute capacity limits:

  • 插槽(或物理处理器或处理包)的最大数目A maximum number of sockets (or physical processors or processor packages)

  • 操作系统报告的最大内核数A maximum number of cores as reported by the operating system

这些限制适用于单个 SQL ServerSQL Server实例。These limits apply to a single instance of SQL ServerSQL Server. 它们代表单个实例将使用的最大计算能力。They represent the maximum compute capacity that a single instance will use. 它们不会限制可能部署该实例的服务器。They do not constrain the server where the instance may be deployed. 实际上,在同一物理服务器上部署多个 SQL ServerSQL Server 实例可以有效使用物理服务器的计算能力,因为插槽和/或内核超出了容量限制允许的数量。In fact, deploying multiple instances of SQL ServerSQL Server on the same physical server is an efficient way to use the compute capacity of a physical server with more sockets and/or cores than the capacity limits allow.

下表指定每个版本的 SQL Server 2019 (15.x)SQL Server 2019 (15.x)的单个实例的计算能力限制:The following table specifies the compute capacity limits for a single instance of each edition of SQL Server 2019 (15.x)SQL Server 2019 (15.x):

SQL ServerSQL Server 版本edition 单个实例的最大计算能力 (SQL ServerSQL Server数据库引擎Database Engine)Maximum compute capacity for a single instance (SQL ServerSQL Server数据库引擎Database Engine) 单个实例的最大计算能力(AS、RS)Maximum compute capacity for a single instance (AS, RS)
Enterprise Edition:基于内核的许可*Enterprise Edition: Core-based Licensing* 操作系统支持的最大值Operating system maximum 操作系统支持的最大值Operating system maximum
开发人员Developer 操作系统支持的最大值Operating system maximum 操作系统支持的最大值Operating system maximum
StandardStandard 限制为 4 个插槽或 24 核,取二者中的较小值Limited to lesser of 4 sockets or 24 cores 限制为 4 个插槽或 24 核,取二者中的较小值Limited to lesser of 4 sockets or 24 cores
ExpressExpress 限制为 1 个插槽或 4 核,取二者中的较小值Limited to lesser of 1 socket or 4 cores 限制为 1 个插槽或 4 核,取二者中的较小值Limited to lesser of 1 socket or 4 cores

*Enterprise Edition 配合服务器+客户端访问许可证 (CAL) 授权将每个 SQL ServerSQL Server 实例的最大内核数限制为 20。*Enterprise Edition with Server + Client Access License (CAL) licensing is limited to 20 cores per SQL ServerSQL Server instance. (此授权不可用于新协议。)基于内核的服务器许可模型没有限制。(This licensing is not available for new agreements.) There are no limits under the Core-based Server Licensing model.

在虚拟环境中,计算能力的限制基于逻辑处理器的数量,而不是内核数。In a virtualized environment, the compute capacity limit is based on the number of logical processors, not cores. 这是因为处理器体系结构对来宾应用程序不可见。The reason is that the processor architecture is not visible to the guest applications.

例如,如果服务器的四个插槽中插入了四核处理器,同时该服务器每个内核可支持两个超线程,这样在启用超线程时就有 32 个逻辑处理器。For example, a server that has four sockets populated with quad-core processors and the ability to enable two hyperthreads per core contains 32 logical processors with hyperthreading enabled. 但在禁用超线程时只有 16 个逻辑处理器。But it contains only 16 logical processors with hyperthreading disabled. 可以将这些逻辑处理器映射至服务器上的虚拟机。These logical processors can be mapped to virtual machines on the server. 这些虚拟机在该逻辑处理器上的计算负载会映射到主机服务器中物理处理器上的执行线程。The virtual machines' compute load on that logical processor is mapped to a thread of execution on the physical processor in the host server.

如果每个虚拟处理器的性能很重要,最好禁用超线程。You might want to disable hyperthreading when the performance for each virtual processor is important. 可以在 BIOS 安装期间为处理器进行 BIOS 设置,从而启用或禁用超线程。You can enable or disable hyperthreading by using a BIOS setting for the processor during the BIOS setup. 但这通常是服务器范围的操作,会影响服务器上运行的所有工作负荷。But it's typically a server-scoped operation that will affect all workloads running on the server. 这就可能要求要在虚拟环境中运行的工作负荷与受益于物理操作系统环境中的超线程性能提升的工作负荷分隔开。This might suggest separating workloads that will run in virtualized environments from workloads that would benefit from the hyperthreading performance boost in a physical operating system environment.

另请参阅See also

SQL Server 2016 的版本和组件 Editions and components of SQL Server 2016
SQL Server 2016 各个版本支持的功能 Features supported by the editions of SQL Server 2016
SQL Server 的最大容量规范 Maximum capacity specifications for SQL Server
SQL Server 2016 安装快速入门Quickstart installation of SQL Server 2016

info_tip 获取帮助Get help

编辑内容 参与编辑 SQL 文档Contribute to SQL documentation

你是否知道你可以自己编辑内容?Did you know that you could edit the content yourself? 这样做不仅可以改进我们的文档,还可以获得页面贡献者的殊荣。If you do so, not only will our documentation improve, but you'll also be credited as a contributor to the page.