PVS_PREALLOCATE Wait Type in SQL Server

⏳Part of the SQL Server Wait Types Library, every wait type explained.Related deep dive: WRITELOG Wait TypeRelated pillar: Performance & Troubleshooting

Is It a Problem?

No. It is not a known contention point, and Get Wait Statistics filters it out by default.


What It Means

Microsoft does not list it in sys.dm_os_wait_stats. It is a background task sleeping between preallocations of space in the persistent version store, for databases with accelerated database recovery on. With no activity, it waits five minutes at a time; under heavy activity, much more often for much less, which suggests the task throttles itself to demand. Accelerated database recovery is always on in Azure SQL Database and Managed Instance; on SQL Server it is per database, from 2019.


When It Does Matter

It does not. The ADR measure worth watching is the size of the persistent version store, because long-running transactions stop it being cleaned up:

SELECT
    DB_NAME(database_id) AS database_name,
    persistent_version_store_size_kb / 1024 AS pvs_size_mb,
    oldest_active_transaction_id,
    oldest_aborted_transaction_id
FROM sys.dm_tran_persistent_version_store_stats;

The baseline to monitor is pvs_size_mb per database staying flat over a working day; steady growth points at an old open transaction. The query needs VIEW SERVER STATE.


Where To Go Next

PVS_PREALLOCATE is background noise on databases with accelerated database recovery. If you are chasing a real problem, start with the waits that cost you time.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *