Currently we have a customer on Navision 3.60 SQL 2000 with a db of approx 200GB. Their hardware is as follows:
4 Xeon 3.2 Processors
8 GB RAM
1 log file on a Raid 10 with 4 15k SCSI drives (internal to server)
4 data files on a Raid 10 with 7.2K SATA drives (on a SAN they recently purchased and according to their IT guy it is fiber to fiber).
They bought the SAN box 2-3 weeks ago and they did a full backup and Navision restore on the above layout when db was 200GB and it took 23 hours to finish (with 3.60 and SQL 2000).
Now this weekend we tried to upgrade them to 4.00 SP2 and SQL 2005. We also deleted some old data reducing their db to 150GB before the upgrade.
They closed on Friday, installed SQL 2005 and Nav 4.00 SP2 and then started the restore. The restore took from Sat 4 am to Sun 7 pm, so that is 24 + 15 = 39 hours (vs 23 hours) for a db that was 50 GB smaller. Needless to say, though we tried, we did not have time to finish the upgrade routines by this morning so we’ll have to revert back to 3.60 for the time being.
Given that the hardware and the file layout was the same in both cases (only new software installed) I would have expected the Navision restore to take less time given the smaller db (not to mention that SQL 2005 and SP2 are supposed to be faster). And therefore the issue lies in the Nav 4.00 SP2 and SQL 2005 combo somewhere.
So now I am stuck as to how to do an upgrade in the only window the client has which is the weekend. I am sure I am doing something wrong but I just cannot tell wheat. So any suggestions (even the "look at the searches" type
) are more than welcome.
Apathy is on the rise but nobody seems to care.
Comments
Also, be aware that SP3 came out last week and that now gives you 2 security models to choose from
Regards
Simon
Now I know I can just convert the database but my problem is that I do not want to go to SQL 2005 until I understand what has caused the perf problem.
So my question is if anyone else has encountered issues like this with 2005 and 4.00 SP2.
P.S. MS is sending me some fixes that they think might solve the issue. Will keep you posted.
1. Ran the restore on the SQL box itself
2. Switched the db to single user mode
3. Switched the recovery mode to simple
Regards
Simon
Hi Simon,
1. Yes.
2. No.
3. No.
But I did not do that before and never had an issue.
Again I guess we are getting wrapped up in details:
Why does 3.60 SQL 2000 restore takes close to double the time of 4.00 SP2 SQL 2005? Hardware was identical both times and same goes for file layout.
Simple Recovery mode will not help. The restore is processed as a single transaction.
I have to disagree. The restore of a Navision backup (*.fbk) is processed as a single logged transaction in SQL. This can result in a rather large transaction log file when restoring a large backup set. If SQL must auto-grow any of the database files (data or log), this can add time to the restore process.
By the way, Microsoft SQL Server was introduced in 1989. It ran under OS/2 and was called something like "SQL for OS/2". I don't remember the exact name.
As discussed, changing the recovery model to Simple will not do much because of the way that the restore process works, which also explains the log file size issue. Nothing worse than doing a restore and finding a problem that stops the restore on one of your last tables in the database, meaning that you have to run the restore process again... not that such a thing has happened to me before
I have tried changing to single user mode with no noticeable difference. Indexing should also not make much of a difference, since the PK is only backed up and restored, the secondary keys are done at the end of the restore process.
Given that this is SQL 2005, I would do the restore with the SP3 client, which fixes many SQL 2005 issues. MS will probably also send you the hotfix that solves these same issues.
I'm wondering too if you can experiment with another machine, or the same server with a really big hard drive installed in a DAS configuration, to see if there is any tweaking that needs to be done with the SAN. Restore to this direct attached drive instead and see how long it takes. If that does work well and fast, you may be able to use the snapshot feature of your SAN to copy that data to the SAN drives, but I don't know too much about SAN's, so I don't know about this for sure.
What I have noticed that the restore is running at least 2 times slower, compared to what I have tested on a PC with local disks - a PC worth 1.500$. (I was using same combination N3.60/SQL2000)
I made there a test to measure the time, because I was sure the "real" server will outperform PC anyway. It seems I was wrong.
I suggest you try to start restore on a "good" PC - in your case perhaps 2 local disks each of 200GB to separate data and log files.
After restore (and if the spent time is < 35hrs), then you just do the SQL backup on PC and SQL restore to SQL server on SAN. I am sure you will be faster at total.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
During restore of 60.000.000 records of table 355, Navision restore dialog window was showing me that it is copying cca 100KB! per second !?! Yes that means 6MB per minute or 360MB per hour. And I have 16GB of 8 fbk files in total. But I am sure it will speed up.
Well my asumption is that Navision backup takes a batch of records (eg. 1000 or 2000 or 10000) and inserts them into DB. Additional asumption is that the avergae time to insert specific number of records is more dependant on the number of the records then on the size of each record. E.g. to insert 10000 records of table 355 takes similar time span as 10000 records of table 17. But the record size is very different, thus more KB are reported during restore of T17 then during T355.
But this is only my assumption ? Can someone confirm or explain how Navision restore actually insert data to DB?
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
With these servers that are mentioned, I would think that the performance should be better for you guys. I would download a tool called Spotlight for SQL to try and get an idea of what is actually going on, and where you can tweak the performance a bit. With my HP RAID controller, I can set a few different scenarious depending on the usage of the drive (such as 50/50 write/read, or 25/75 write/read, etc.) Maybe you can change some of these settings temporarily while you do the restore.