lightweight pooling 服务器配置选项lightweight pooling Server Configuration Option

适用对象:是SQL Server 否Azure SQL 数据库 否Azure Synapse Analytics (SQL DW) 否并行数据仓库APPLIES TO: yesSQL Server noAzure SQL Database noAzure Synapse Analytics (SQL DW) noParallel Data Warehouse

使用“轻型池”选项可以减少有时在对称多处理 (SMP) 环境下遇到的、与过多的上下文切换有关的系统开销。Use the lightweight pooling option to provide a means of reducing the system overhead associated with the excessive context switching sometimes seen in symmetric multiprocessing (SMP) environments. 如果出现过多的上下文切换,轻型池可以通过上下文切换内联化,从而降低用户/内核环的转换频率,达到提高吞吐量的目的。When excessive context switching is present, lightweight pooling can provide better throughput by performing the context switching inline, thus helping to reduce user/kernel ring transitions.

纤程模式专用于 UMS 工作线程的上下文切换是性能的关键瓶颈的某些情况。Fiber mode is intended for certain situations in which the context switching of the UMS workers are the critical bottleneck in performance. 因为这种情况很少出现,所以纤程模式很少增强典型系统上的性能或可扩展性。Because this is rare, fiber mode rarely enhances performance or scalability on the typical system. MicrosoftMicrosoft Windows Server 2003Windows Server 2003 中改进的上下文切换也减少了对纤程模式的需求。Improved context switching in MicrosoftMicrosoft Windows Server 2003Windows Server 2003 has also reduced the need for fiber mode. 我们建议您不要使用纤程模式计划日常操作。We do not recommend that you use fiber mode scheduling for routine operation. 这是因为它会抑制上下文切换优点的正常发挥,并且使用线程本地存储区 (TLS) 或线程所有的对象(如互斥体,一种 Win32 内核对象)的某些 SQL ServerSQL Server 组件在纤程模式下无法正常工作。This is because it can decrease performance by inhibiting the regular benefits of context switching, and because some components of SQL ServerSQL Server that use Thread Local Storage (TLS) or thread-owned objects, such as mutexes (a type of Win32 kernel object), cannot function correctly in fiber mode.

lightweight pooling 设置为 1 将使 SQL ServerSQL Server 切换到纤程模式计划。Setting lightweight pooling to 1 causes SQL ServerSQL Server to switch to fiber mode scheduling. 该选项的默认值为 0。The default value for this option is 0.

lightweight pooling 选项是一个高级选项。The lightweight pooling option is an advanced option. 如果使用 sp_configure 系统存储过程来更改该设置,则仅当“显示高级选项”设置为 1 时才可以更改“轻型池”。If you are using the sp_configure system stored procedure to change the setting, you can change lightweight pooling only when show advanced options is set to 1. 该设置在服务器重新启动后生效。The setting takes effect after the server is restarted.


MicrosoftMicrosoft Windows 2000 和 MicrosoftMicrosoft Windows XP 不支持轻型池。Lightweight pooling is not supported for MicrosoftMicrosoft Windows 2000 and MicrosoftMicrosoft Windows XP. Windows Server 2003Windows Server 2003 完全支持轻型池。provides full support for lightweight pooling.


轻型池不支持执行公共语言运行时 (CLR)。Common language runtime (CLR) execution is not supported under lightweight pooling. 禁用以下两个选项之一:“clr enabled”或“lightweight pooling”。Disable one of two options: "clr enabled" or "lightweight pooling". 依赖于 CLR 并且在纤程模式下无法正常工作的功能包括:hierarchy 数据类型、复制和基于策略的管理。Features that rely upon CLR and that do not work properly in fiber mode include the hierarchy data type, replication, and Policy-Based Management.

另请参阅See Also

clr enabled 服务器配置选项 clr enabled Server Configuration Option
服务器配置选项 (SQL Server) Server Configuration Options (SQL Server)
sp_configure (Transact-SQL) sp_configure (Transact-SQL)
clr enabled 服务器配置选项clr enabled Server Configuration Option