Change File Growth
After a discussion and demo of SQL Clone to my team yesterday the question came up that made me think.
If the same records are updated over and over will all those changes be tracked in the difference file and bloat the files for the clone on disk.
So our main purpose of the tool is to help QA test data. If they run the same test 1000 times that update the same set of customer accounts in the clone database will each change be added to the file?
If the same records are updated over and over will all those changes be tracked in the difference file and bloat the files for the clone on disk.
So our main purpose of the tool is to help QA test data. If they run the same test 1000 times that update the same set of customer accounts in the clone database will each change be added to the file?
Tagged:
Comments
That said, I'd encourage you to try it out for your use case and see if it works in a way that's useful to you! If not, we'd love to hear the details of why in case we can do something to improve that.
Update:
I've seen the clone file get larger without having actually touched/updated/read the data. Clone is now at almost 6gb from 3.3gb when I posted. What causes this growth?
Redgate Software
On the clone that I've loaded on the Server perhaps, but for my local no. The only thing that I could think of would be auto-update stats; however that wouldnt account for the growth over the weekend when the system was idle.
I've also seen this strange behaviour, stars out small (50 - 70 MB) and increases to around a few GB without any direct access, in most cases the growth increase stops around that mark but I've also seen it carry on over 100 GB and fill the drive.
This issue is being seen on SQL 2017 using SQL Clone 2.5.2, and I never saw these issues during our trial of the product on earlier 2.x versions of the software.
I've tried disabling auto stats and auto shrink, and even the ghost cleanup process, and there are no agent jobs running on the server when these issue occur, but I can see read/write activity against the data files for the clone database affected.
Also rather strange is that we clone three copies of the image with a slightly different database name and generally only see the issues on one or two of the database, but never all of them.
Cheers,
David.
Thanks for your post.
Can we just check if you are using row level compression?
Are there any operations being carried out on the clones? Does SQL Server have any pages pending? If so, when you create images and clones if you use the wait SQL Clone operator in Powershell then it should wait for each operation to complete before creating your Clones. This might be why you are seeing this on one but not all Clones.
I hope this helps.
Kind regards
Richard Lynch.
Redgate Software
No row level compression on our databases, but i think I've traced it down to the Ghost Cleanup process, I previously changed activated trace flag (661) on a global level via DBCC TRACEON command, but this didn't seem to have an effect on this issue.
In re-creating this issue today, I could see that the clone growth was linked to the ghost clean-up process as that was the only process running against the affected databases, so after adding the trace flag to the SQL service startup options and restarting SQL, the issue appears to have stopped and I haven't been able to re-create it as I could before this change.
The main difference between seeing this issue now and not previously when trialling the software, is that were are using the modification script option in the image process to remove quite a bit of logging/temp data and related objects from the image to reduce disk usage, but it looks like the after affect of this is the ghost cleanup process is kicking off on the clones of the database which is causing the large number of differences to be generated.
I'll keep and eye on the clones following this change, to ensure it's fixed the issue for good.
Cheers,
David.
Thanks for your post.
If you don't receive any help quickly from the community and have a support contract then please send us a ticket so that a product specialist can investigate this for you.
Kind regards
Richard Lynch.
Redgate Software