SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Performance Implications of Database Snapshots


Performance Implications of Database Snapshots

Author
Message
GilaMonster
GilaMonster
SSC Guru
SSC Guru (90K reputation)SSC Guru (90K reputation)SSC Guru (90K reputation)SSC Guru (90K reputation)SSC Guru (90K reputation)SSC Guru (90K reputation)SSC Guru (90K reputation)SSC Guru (90K reputation)

Group: General Forum Members
Points: 90269 Visits: 45284
Comments posted to this topic are about the item Performance Implications of Database Snapshots

Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


SQLPhil
SQLPhil
SSCommitted
SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)

Group: General Forum Members
Points: 1582 Visits: 740
Brilliant article! It just goes to show that there are a whole host of things to consider whenever you're devising a backup strategy for your systems. Thanks to the information you've provided Gail, I'm sure you've saved a lot of people a considerable amount of time if they're looking to evaluate the effectiveness of snapshots as a backup and recovery solution.
GilaMonster
GilaMonster
SSC Guru
SSC Guru (90K reputation)SSC Guru (90K reputation)SSC Guru (90K reputation)SSC Guru (90K reputation)SSC Guru (90K reputation)SSC Guru (90K reputation)SSC Guru (90K reputation)SSC Guru (90K reputation)

Group: General Forum Members
Points: 90269 Visits: 45284
Thanks. Glad you liked it.

Just one thing though. Snapshots are not a backup strategy. They're great for rolling back accidental changes, but if the source DB is damaged, dropped, corrupted, offline, etc, the snapshot will be inaccessible and will have to be dropped.

Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


SQLPhil
SQLPhil
SSCommitted
SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)

Group: General Forum Members
Points: 1582 Visits: 740
All the more reason for me to read up some more on them! Smile
GilaMonster
GilaMonster
SSC Guru
SSC Guru (90K reputation)SSC Guru (90K reputation)SSC Guru (90K reputation)SSC Guru (90K reputation)SSC Guru (90K reputation)SSC Guru (90K reputation)SSC Guru (90K reputation)SSC Guru (90K reputation)

Group: General Forum Members
Points: 90269 Visits: 45284
Phil Melling (9/23/2008)
All the more reason for me to read up some more on them! Smile


Hehe When I get a chance I'll try and finish the follow-up to this article - what snapshots are and what they're not.

Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


Matt Whitfield
Matt Whitfield
SSC Eights!
SSC Eights! (917 reputation)SSC Eights! (917 reputation)SSC Eights! (917 reputation)SSC Eights! (917 reputation)SSC Eights! (917 reputation)SSC Eights! (917 reputation)SSC Eights! (917 reputation)SSC Eights! (917 reputation)

Group: General Forum Members
Points: 917 Visits: 719
I would say the conclusion is a bit of an understatement - with 5 snapshots the graphs show performance degradation of 500% at best, and 5000% at worst...

Put another way, unless your SQL Server is under about 2% load or less, then putting in 5 snapshots would have the distinct possibility that your server would then be under 100% load.

Of course, that's an over-simplification, and the tests aren't very specific about the bandwidth of disk IO etc etc - but even so, those graphs are distinctly scary.

Atlantis Interactive - SQL Server Tools
My blog
Why I wrote a sql query analyzer clone
Mike Metcalf
Mike  Metcalf
SSC Eights!
SSC Eights! (903 reputation)SSC Eights! (903 reputation)SSC Eights! (903 reputation)SSC Eights! (903 reputation)SSC Eights! (903 reputation)SSC Eights! (903 reputation)SSC Eights! (903 reputation)SSC Eights! (903 reputation)

Group: General Forum Members
Points: 903 Visits: 53
We use Snapshots in our production system, what I am wondering is whether the snapshots for the tests were on the same disks as the main database file, or seperate ones, and also whether the snapshots themselves were on seperate disks?

People should also be incredibly wary of putting a snapshot on the same disk as a DB, due to the nature of how snapshots work they become very fragmented (this should probably be addressed by MS), should your filegroup grow on that disk then the fragmentation will carry over to that too, leading to a performance loss.
ChiragNS
ChiragNS
Hall of Fame
Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)

Group: General Forum Members
Points: 3505 Visits: 1865
Nice article Gail.

The pages from the source database get written to the snapshot's sparse file the first time the page gets modified in the source database. Is that right?

If that's so, does then the performance degradation happen only for the first time a page gets modified.

"Keep Trying"
GilaMonster
GilaMonster
SSC Guru
SSC Guru (90K reputation)SSC Guru (90K reputation)SSC Guru (90K reputation)SSC Guru (90K reputation)SSC Guru (90K reputation)SSC Guru (90K reputation)SSC Guru (90K reputation)SSC Guru (90K reputation)

Group: General Forum Members
Points: 90269 Visits: 45284
Mike Metcalf (9/23/2008)
We use Snapshots in our production system, what I am wondering is whether the snapshots for the tests were on the same disks as the main database file, or seperate ones, and also whether the snapshots themselves were on seperate disks?


For the first set of tests (insert, update, delete) everything was on 1 drive. It was a workstation PC, it only had one drive.
The second test that I did (deletes on the server) the snapshot files were separate from the data and log files. iirc, I put them onto the drive used for backups (which was not in use at that time)

I didn't have enough drives (even on the server) to test with one snapshot per drive. If they are, I would imagine the effect is drastically reduced.

Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


GilaMonster
GilaMonster
SSC Guru
SSC Guru (90K reputation)SSC Guru (90K reputation)SSC Guru (90K reputation)SSC Guru (90K reputation)SSC Guru (90K reputation)SSC Guru (90K reputation)SSC Guru (90K reputation)SSC Guru (90K reputation)

Group: General Forum Members
Points: 90269 Visits: 45284
Chirag (9/23/2008)
Nice article Gail.

The pages from the source database get written to the snapshot's sparse file the first time the page gets modified in the source database. Is that right?

If that's so, does then the performance degradation happen only for the first time a page gets modified.



Yes to both.

Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search