Comments
5 comments
-
This link explains a possible reason for clone to inflate.
-
Unfortunately that link did not help, we don't have any maintenance plans running on this instance and have confirmed that. We continue to see large VHD file growth where we see no benefit in using the SQL Clone product for any type of disk savings.
-
Hi Randy,
As you'll know, clones are differencing disks, and will grow when something writes to their data files. The usual culprit is SQL Server, which makes its own decisions about what to write to attached data files, and when. That can make diagnosing these kinds of issues tricky.
I've got a few diagnostic questions:- Do clones grow on their own if you don't write to them? (E.g. they're just created, with no modification template, and are left to sit there.)
- Do clones grow on their own if they're made from images without any modifications?
- If you've been seeing growth in clones based on an image from a live database, what about clones based on an image from a backup file? (Or vice versa if you've been making images from backup files?)
- Do you have any clones that don't grow by themselves? Is there any pattern there?
Owen -
The simplest way to diagnose this is to use DMVs and look at indexes with high write counts, since DMVs reset since last reboot or when the db was last created. As long as you did not reboot between the time you created the clone, then the writes will lead you to exactly what you are doing to balloon the db size.
-
To follow-up here, we've been experiencing this problem on our largest database. Anecdotally, the problem seems to occur once databases cross the 1 TB threshold.
The other problem I see is that RedGate SQL Clone Agent does not log when the image is finished building, only when its creation started. In fact, for all my images, if I query the SqlClone_Config database directly, the State of the operation is 4 (Successful), but we don't know WHEN the Operation changed its state to Successful.
SELECT * FROM dbo.Images i
JOIN dbo.Operations o
ON i.Id = o.ImageId
WHERE i.DeletedOn IS NULLSeparately, if I reset a Clone, it starts off at 44.1 MB, then goes to 381 MB, then goes to 17.0 GB…. and then 38 GB… all without me doing anything? I can record a video of this happening. I can also run SQL Profiler to demonstrate nothing is happening to the clone I reset.
I also took my own suggestion to RandyBCD 6 years ago, and checked for index writes. There are none.
Add comment
Please sign in to leave a comment.