Log backup and running time

  • Hi,

    Bit of an idea to ponder:

    I have a server with 15 user databases ranging in size, the largest being 120GB. There is a blanket 'Backup Transaction Log' job with does all DBs and runs every 15 mins. The job generally takes about 1 minute to complete. What I have noticed however is that sometimes (when there seems to be some batch jobs running unsurpirisingly :rolleyes:) the complete tx backup job will take up to 40 mins, and some of the backup files will be as large as 40GB. This is a bit confusing but I'm unsure if I can do anything specific from a strategy point of view:

    1) Presumably more regular backups would keep any logging tuncated so the jobs should be a bit quicker?

    2) Would the knockon effect of a shorter period between backups not mean that a lot would be ignored? For instance every 15 mins means if I have one that starts at 20:00 but takes 41 mins, the next one won't kick-in till 20:45. Shortening the schedule won't be much benefit?

    3) Maybe the tx backups need to be split into their own jobs, rather than having one job which runs through the databases in turn? Would there be any implications to potentially multiple tx backups occuring simultaneously?

    4) Am I worrying about nothing?

  • I think #3 should help. Are the large t-logs always from the same database ?

  • Are the Batch jobs running BULK inserts for example? If so, then for the period of the batch job running you could place the affected database into the Bulk-Logged Recovery Model which would reduce the size of the transaction logs considerably before changing back into Full. If you decide to use this technique however, you would need to be sure to perform a Full backup after the batch has finished to ensure you have a platform for your next transaction log backup.

    You could also perhaps consider (but only consider!) whether or not you need to run the database in the Full Recovery Model. Obviously, if point-in-time recovery is important with regards to this database then the only option wold be full. If however, a combination of Full and Differential backup would suffice, you could save an enormous amount of a) space for the transaction log and b) time taken to complete the backup.

    The move out of the Full Recovery Model should not be taken lightly however and testing the scenario in a safe environment would be highly recommended!

  • 1) I would immediately switch to the FREE, AWESOME, FULLY DOCUMENTED ola.hallengren.com maintenance suite for all SQL Server mx activities!!

    2) I would probably switch to a job per database to avoid issues you are seeing. Perhaps you can group things together and isolate out the misbehaving dbs, assuming you need/want to adhere to your 15 minute tlog backup interval.

    3) I agree with other poster that it could be bulk activities happening, which require reading the database to get modified pages to back up.

    4) I would definitely monitor the tlog drive and backup drive for IO stalls!! You especially don't want the tlog drive(s) to be slow - that can seriously affect database DML throughput!!

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply