Quick Answer
LOGMGR_FLUSH is a benign internal wait generated by SQL Server's log manager during routine background operations. This wait occurs during normal transaction log maintenance activities and does not indicate performance problems. Filter this wait type from your wait statistics analysis as it provides no actionable diagnostic value.
Root Cause Analysis
LOGMGR_FLUSH waits originate from SQL Server's log manager component during background transaction log maintenance operations. The log manager performs continuous housekeeping tasks including log buffer management, checkpoint coordination, and internal log structure maintenance. These operations generate LOGMGR_FLUSH waits as part of normal processing.
The wait occurs when background threads coordinate log flushing activities with other database engine components. This coordination is essential for maintaining transaction log consistency but creates brief wait periods that appear in sys.dm_os_wait_stats. The wait does not represent actual performance bottlenecks or resource contention.
Microsoft's official documentation categorizes this as informational only, confirming it represents internal engine coordination rather than user workload delays. The wait has remained consistent across SQL Server versions 2016 through 2022, appearing in both on-premises and Azure SQL Database environments.
AutoDBA checks benign wait type filtering, wait statistics analysis, and performance bottleneck identification across your entire SQL Server instance in 60 seconds. Download the free diagnostic script and see what else needs attention.
Diagnostic Queries
Verify LOGMGR_FLUSH presence in your wait statistics:
SELECT
wait_type,
waiting_tasks_count,
wait_time_ms,
max_wait_time_ms,
signal_wait_time_ms
FROM sys.dm_os_wait_stats
WHERE wait_type = 'LOGMGR_FLUSH';
Confirm this wait is not impacting performance by checking it represents minimal total wait time:
WITH TotalWaits AS (
SELECT SUM(wait_time_ms) AS total_wait_ms
FROM sys.dm_os_wait_stats
WHERE wait_type NOT IN ('CLR_AUTO_EVENT', 'CLR_MANUAL_EVENT', 'LAZYWRITER_SLEEP')
)
SELECT
ws.wait_type,
ws.wait_time_ms,
CAST(100.0 * ws.wait_time_ms / tw.total_wait_ms AS DECIMAL(5,2)) AS percentage_of_waits
FROM sys.dm_os_wait_stats ws
CROSS JOIN TotalWaits tw
WHERE ws.wait_type = 'LOGMGR_FLUSH';
Prevention
No prevention is required for LOGMGR_FLUSH waits as they represent normal SQL Server operation. These waits indicate the log manager is functioning correctly and performing necessary background maintenance. Attempting to eliminate these waits would be counterproductive and potentially harmful to database stability.
Modern monitoring solutions automatically filter benign wait types including LOGMGR_FLUSH from performance analysis. This filtering prevents false alarms and allows DBAs to concentrate on wait types that genuinely impact user workloads and require intervention.
Need hands-on help?
Dealing with persistent logmgr_flush issues across your environment? Samix Technology provides hands-on SQL Server performance consulting with 15+ years of production DBA experience.