100% completion in 8 minutes, recovery takes 2 hours
Brian K
Posts: 12
SQL Virtual Restore 5.2.1.7
I have a 20gb database backup in Redgate SQL Backup 6.5 format, non-encrypted, single-stream, compression level 3, SQL 2005 server.
I'm trying to restore the database onto what SHOULD be a blindingly fast 64-bit SQL 2008 server.
I've enabled stats reporting to message window, and it reaches 100% in about 8 minutes, but recovery took around two hours.
I enabled the verbose restore logging traceflag and most of the time seems to be spent on "Restore-Redo begins on database Attendance_Virtual".
Any ideas what's going on?
I have a 20gb database backup in Redgate SQL Backup 6.5 format, non-encrypted, single-stream, compression level 3, SQL 2005 server.
I'm trying to restore the database onto what SHOULD be a blindingly fast 64-bit SQL 2008 server.
I've enabled stats reporting to message window, and it reaches 100% in about 8 minutes, but recovery took around two hours.
I enabled the verbose restore logging traceflag and most of the time seems to be spent on "Restore-Redo begins on database Attendance_Virtual".
Any ideas what's going on?
Comments
It sounds like it's the upgrade process which is taking the time. As the backup source is SQL Server 2005 and the destination is SQL 2008, SQL Server will upgrade the database before it can be recovered. The output of the RESTORE DATABASE [dbname] WITH RECOVERY should include lots of upgrade steps, is this the case?
Thanks,
Redgate Foundry
A straight restore with SQL Backup takes around 10 minutes, and the Virtual Restore task was with no recovery.
Another database full restore of a DB about 3/4 the size took only 7.5 minutes for restore and recovery.
I'm a little confused, in your original post you stated that the recovery took 2 hours. If the restore was to NORECOVERY, what recovery process is it that took 2 hours?
Thanks,
Redgate Foundry
I'm sorry, that was a mistake on my part. It was 2 hours before the TSQL restore command completed with no recovery and the database was finally ready for a differential restore.
Does that make sense?
The SQL log so far:
The top step, restore/redo, takes around a minute when restoring from native SQL Backup file for the same database. Historically, this step should take at least an hour to run with Virtual Restore, I'll update when it does finally complete.
Out of interest, how big are the vmdf and vldf files at the moment? Can you also tell me if they are growing during this part of the restore?
Thanks,
Redgate Foundry
vmdf 603mb and growing quickly
vldf 809mb and no observed change in size.
Still at same "redo" step.
If you open the HyperBac Configuration Manager and choose Advanced, what is the value for Index Path?
Could you also give me a few details on the spec of the SQL 2008 box?
Thanks,
Redgate Foundry
Overall CPU usage is 30%, sql/hyperbac both around 10% on average.
Hyperbac memory usage 600mb, sql 15gb +-.
Index path: C:\Program Files (x86)\Red Gate\HyperBac\indexes
Virtualized (Vsphere 4.1) SQL Server 2008 R2 64-bit, WIndows 2008 datacenter 64-bit, 32gb memory, 16gb allocated to SQL instance.
Running on Dell R900 vsphere host, connected to CX-240 SAN.
1.3tb data drive, 250mb log drive, miscellaneous other drives.
4 CPUs.
I wonder if we're just grabbing this database backup int he middle of some maintenance task or bulk import and a gigantic transaction is being rolled forwards.
Basically all the roll forward is getting pumped into those virtual files and being indexed at the same time which is both affecting your performance and giving you large virtual files.
Even so it does seem particularly slow, are there any logs other than Service.log in the HyperBac logs directory?
Thanks,
Redgate Foundry
1a100000000003D and C000000000219D
I may have the wrong number of "0"s, but you get the general idea.
The attendance vmdf is now 2.5 gb, the compressed sql backup file itself is only 4.2gb...
The restore completed at 2 hours 1 minute. Restore-Redo began at 10:43, rollforward completed at 12:27, database was available 12:32. SQL 2005 to 2008 upgrade scripts ran from 12:27 to 12:32 approximately.
The vmdf ended up being 3.9gb.
Those log files are definitely too old to worry about then.
It does sound like the backup may have been taken at an inconvenient time, would you be able to try another backup for that database and compare results?
Thanks,
Redgate Foundry
We have seen this with two different backups, both scheduled at 1am on Saturday. I'll check out maintenance plans and other jobs and see what's going on then.
I'm seeing the same thing. Virtual Restore takes much longer than normal restores. The log files are also very large, growing by a few lines every millisecond!! - so I think that is why it's slow for me. Haven't been able to fix it yet. But make sure your log files aren't as busy as mine.
Cheers.
James
About a third of our database backups we're restoring onto a reporting server have this same problem.
The backups typically take four to eight times longer than a normal SQB restore.
I really can't find a common cause for this issue, redo/recovery takes less than a minute with Redgate SQL Backup, and two hours + with Virtual Restore.