Hi there,
We are having considerable pain when performing log backups on a large database with many files and partitions. The database in question is over 1TB and has approximately 4,000 files (for table partitioning).
The command we use is:
BACKUP LOG [MyDb] TO DISK = N'E:\MyDb.trn' WITH NOFORMAT, NOINIT, NAME = N'MyDb', SKIP, NOUNLOAD, NO_COMPRESSION, STATS = 10
The command takes 73 seconds to run (even when there have been very, very few transactions actually recorded), but the output tells a different story:
100 percent processed.
Processed 63 pages for database 'MyDb', file 'MyDb_Log' on file 1.
BACKUP LOG successfully processed 63 pages in 1.610 seconds (0.301 MB/sec).
SQL Server increases about 30% CPU usage during this 73 seconds.
The log file size itself is only about 50mb (since we regularly backup).
What is the log backup process doing to use so much CPU and take so long?