FIX: Decreased SQL Server performance when there is elevated privileged mode CPU usage and a high volume of page latch waits

Symptoms

After you install SQL Server 2014 Service Pack 1 (SP1), SQL Server 2012 SP3, or SQL Server 2016, you experience slow query performance and elevated privileged (kernel) mode CPU usage until the server is restarted. You may also see a high volume of PAGELATCH_* waits.

Resolution

The issue was fixed in the following cumulative updates of SQL Server:
Recommendation: Install the latest cumulative update for SQL Server


Cause

SQL Server uses dynamic latch promotion and demotion logic (super/sub-latch). This improves SQL Server performance and scalability by keeping track of the number of acquires on a latch, and on how long it should take to acquire the same latch if no latch contention existed. Then, eligible latches are promoted (super-latch) based on this model. When there are many changes (inserts/updates/deletes) on a Heap or BTree (HoBT), the HoBT-associated latches may be promoted to super latch status. However, the demotion does not occur automatically. You can read more about super/sub-latching in this article.

If these HoBTs are later deallocated, the freed HoBT goes back to a global cache for reuse. When that HOBT is reused, it reuses the previously promoted latch, even when there is no contention on the HoBT. This adds CPU overhead. This behavior increases the privileged (kernel) mode CPU usage of SQL Server until the server is restarted. This increase typically adds no more than several microseconds with each execution. You may also see a high volume of PAGELATCH_* waits because of these extended super-latches on HoBTs. 

Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

Vlastnosti

ID článku: 3162589 – Posledná kontrola: 5. 10. 2016 – Revízia: 1

Pripomienky