FIX: High CPU usage causes performance issues in SQL Server 2016

When you use either a new instance of Microsoft SQL Server 2016 or an instance of SQL Server 2016 that's upgraded from an earlier version of SQL Server, you experience performance issues because of high CPU usage. Additionally, if you query the sys.dm_os_spinlock_stats table, you notice a high value for the spins column (compared to other rows in the table) that corresponds to the SECURITY_CACHE (Security Cache) and CMED_HASH_SET (Metadata Cache). For example, you notice the following values.


This issue occurs because of high spin lock contention in a highly concurrent system. In these operating systems, multiple CPU threads are competing for resources and spinning for an extended interval while they run in a loop periodically to determine whether the resource is available instead of immediately yielding. When multiple CPU threads keep spinning (in a while loop) for a resource instead of yielding, this causes high CPU usage that cause performance issues.
This problem was fixed in the following cumulative updates for SQL Server:

Note After you apply SQL Server 2016 Cumulative Update 2 (CU2), the SECURITY_CACHE and CMED_HASH_SET names are changed to LOCK_RW_SECURITY_CACHE and LOCK_RW_CMED_HASH_SET, respectively. After CU2 is applied, the values appear as follows.


About cumulative updates for SQL Server
Each new cumulative update for SQL Server contains all the hotfixes and all the security fixes that were included with the previous cumulative update. Check out the latest cumulative updates for SQL Server:
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
Learn about the terminology that Microsoft uses to describe software updates.

The white paper Diagnosing and Resolving Spinlock Contention on SQL Server discusses issues and resolutions related to spinlock contention in detail.

Artikli ID: 3195888 – viimati läbi vaadatud: 09/30/2016 17:56:00 – redaktsioon: 3.0

Microsoft SQL Server 2016 Developer, Microsoft SQL Server 2016 Enterprise, Microsoft SQL Server 2016 Enterprise Core, Microsoft SQL Server 2016 Express, Microsoft SQL Server 2016 Standard, Microsoft SQL Server 2016 Web

  • kbqfe kbsurveynew kbfix kbexpertiseadvanced KB3195888