Sql-server – SQL server suddenly backups are slow and async_io_completion shows suspended for long time

sql server

50GB database – full backup normally takes 14 (10 minutes backup, 4 minutes to compress). Suddenly the backup execution time has been climbing upward to 3-4 hours. Backup dest is a Network path.

To eliminate the network as an issue, used backup to 'NUL:' – same results 4 hrs.

During the full backup async_io_completion is showing "suspended" examples below:
(1161299ms)ASYNC_IO_COMPLETION 1pm / 22% complete
(2838894ms)ASYNC_IO_COMPLETION 2pm / 60% complete
(3969124ms)ASYNC_IO_COMPLETION 230pm / 77% complete
(4818588ms)ASYNC_IO_COMPLETION 245pm / 80% complete
(5816122ms)ASYNC_IO_COMPLETION 3pm / 86% complete
(6695511ms)ASYNC_IO_COMPLETION 315pm / 89% complete

checked VLF count is low (less than 100) / Tried SQL native backup – same results / DBCC checkdb – no errors.

HERE IS THE KICKER….Took a full backup of this 50gb and created a new db on the same SQL instance (alongside orig db). Executed a full backup on the newly created db and the backup time is back to normal 14 minutes.

Anyone has suggestions on why the newly copy of the same db would perform correctly? Is there something SQL related that can be checked/verified to determine root cause? Leaning towards SAN or VM issue, need proof.

Env info:
VM environment
Windows 2016 32GB
SQL Standard 2017 CU16

Best Answer

Check for log file fragmentation

use slow_database go

select count(*) from sys.dm_db_log_info ( db_id() )

if this number is high (>10,000s) then maybe the log file fragmentation is the culprit