Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 12345»»»

Performance Implications of Database Snapshots Expand / Collapse
Author
Message
Posted Tuesday, September 23, 2008 12:32 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 3:43 PM
Points: 43,047, Visits: 36,206
Comments posted to this topic are about the item Performance Implications of Database Snapshots


Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
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

Post #574056
Posted Tuesday, September 23, 2008 12:49 AM


UDP Broadcaster

UDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP Broadcaster

Group: General Forum Members
Last Login: Friday, September 12, 2014 2:46 AM
Points: 1,442, Visits: 723
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.
Post #574069
Posted Tuesday, September 23, 2008 1:06 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 3:43 PM
Points: 43,047, Visits: 36,206
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 2008, MVP
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

Post #574074
Posted Tuesday, September 23, 2008 1:10 AM


UDP Broadcaster

UDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP Broadcaster

Group: General Forum Members
Last Login: Friday, September 12, 2014 2:46 AM
Points: 1,442, Visits: 723
All the more reason for me to read up some more on them! :)
Post #574075
Posted Tuesday, September 23, 2008 1:28 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 3:43 PM
Points: 43,047, Visits: 36,206
Phil Melling (9/23/2008)
All the more reason for me to read up some more on them! :)


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 2008, MVP
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

Post #574083
Posted Tuesday, September 23, 2008 2:21 AM


Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Monday, July 22, 2013 11:59 AM
Points: 509, 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
Post #574108
Posted Tuesday, September 23, 2008 2:22 AM
Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Wednesday, May 22, 2013 10:04 AM
Points: 585, 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.
Post #574111
Posted Tuesday, September 23, 2008 2:43 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Monday, September 1, 2014 6:55 AM
Points: 2,366, Visits: 1,845
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"
Post #574121
Posted Tuesday, September 23, 2008 2:45 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 3:43 PM
Points: 43,047, Visits: 36,206
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 2008, MVP
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

Post #574123
Posted Tuesday, September 23, 2008 2:47 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 3:43 PM
Points: 43,047, Visits: 36,206
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 2008, MVP
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

Post #574125
« Prev Topic | Next Topic »

Add to briefcase 12345»»»

Permissions Expand / Collapse