LATCH_KP is a wait for a Keep (KP) mode latch on an internal SQL Server structure that is not a data or index page. Keep mode is the lightest latch: it pins a structure so it cannot be destroyed while the holder looks at it, and it is compatible with every other mode except Destroy (DT). The wait type exists mainly so all five latch modes have LATCH_* entries.
Because KP conflicts only with destruction, waits are inherently rare.
Is It a Problem?
Practically never. A LATCH_KP wait means a thread wanted to pin a structure at the exact moment another thread was destroying it, a vanishingly narrow window. Expect zero or near zero everywhere.
As with all non-page latch waits, any real analysis happens at the latch class level: sys.dm_os_latch_stats groups all modes together per class, and the class names the subsystem.
Common Causes
- A pin request colliding with a structure teardown, momentarily.
- Severe churn on one internal structure (the same conditions that raise
LATCH_EX/LATCH_DTon its class).
What To Do
- Ignore it in isolation.
- If latch waits matter on your system, work from
sys.dm_os_latch_statsby class; the mode split adds nothing.
How To See It
Rank waits with Get-WaitStatistics, then pivot to latch classes when latching is genuinely the question.
LATCH_KP is background noise on a healthy instance. If you are chasing a real problem, start with the waits that actually cost you time.
- The waits that usually matter, ranked, with what each one is telling you.
- Performance & Troubleshooting, the scripts and guides for this part of the stack.
Leave a Reply