輕量型共用伺服器組態選項lightweight pooling Server Configuration Option

適用於: 是SQL Server 否Azure SQL Database 否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.

Fiber 模式適用於 UMS 工作者的環境切換是重大效能瓶頸的某些狀況。Fiber mode is intended for certain situations in which the context switching of the UMS workers are the critical bottleneck in performance. 因為這個狀況非常罕見,所以 Fiber 模式幾乎不太會提高一般系統上的效能或延展性。Because this is rare, fiber mode rarely enhances performance or scalability on the typical system. MicrosoftMicrosoft Windows Server 2003Windows Server 2003 中的改良式環境切換也減少了 Fiber 模式的需求。Improved context switching in MicrosoftMicrosoft Windows Server 2003Windows Server 2003 has also reduced the need for fiber mode. 我們不建議您針對例行作業使用 Fiber 模式排程。We do not recommend that you use fiber mode scheduling for routine operation. 這是因為 Fiber 模式可能會抑制內容切換通常會有的好處而降低效能,而且使用執行緒本機存放裝置 (TLS) 或執行緒擁有之物件 (例如 Win32 核心物件) 的某些 SQL ServerSQL Server 元件無法在 Fiber 模式下正確運作。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 切換成 Fiber 模式排程。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 系統預存程序來變更此設定,只有當 show advanced options 設為 1 時,才能變更 lightweight poolingIf 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.

注意

輕量型共用不支援 Common Language Runtime (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 而且在 Fiber 模式下無法正常運作的功能包括了階層資料類型、複寫和以原則為基礎的管理。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 已啟用伺服器組態選項 clr enabled Server Configuration Option
伺服器組態選項 (SQL Server) Server Configuration Options (SQL Server)
sp_configure (Transact-SQL) sp_configure (Transact-SQL)
CLR 已啟用伺服器組態選項clr enabled Server Configuration Option