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

Parallel Restoring of database Expand / Collapse
Author
Message
Posted Wednesday, June 03, 2009 4:08 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, March 12, 2010 7:07 AM
Points: 4, Visits: 16
hi everyone,

iam just doing a sample task , of restoring 4 databases Parallely as well as sequentially, through C# code. (all together size of DB's are 2GB)

sequentially restoring database one by one.
Sequetial Total Time: 1 minute 20 Seconds (approx)
1st DB: 5 second
2nd DB: 30 Second
3rd DB: 25 Second
4th DB: 20 Second ( Total 1 minute 20 Second)

Parallel restoring database all atonce. The UI of sqlserver shows Restoring for all the databases simultaneously using C# threading code.

Parallel Total Time: 1 minute 45 Seconds (approx)
1st DB: 50 th second
2nd DB: 1 minute 20 th second
3rd DB: 1 minute 45th second
4th DB: 1 minute 45th second

the total parallel time should have been 30second because that was the max time taken by large database (2nd DB - 620MB approx), but it is not so in above case.

after several iteration the total Parallel time always takes more time than total Sequential time.

the same C# code other than restoring databases in SQL SERVER like (Copying files in code, Deploying IIS through code or any other processes) saves more than half of the time.

When it comes to sql server it takes more time(the same threading code). i need to give more specific reason to my team.

i could understand answer like stress will more on sqlserver ( server resources used more) which is not good.

can Someone tell me like specific reason does sqlserver can have only one active connection at a time ( Is this true or anything like this).

IS parallel restoring possible in Sqlserver, to put it simple.

Database Used: Sqlserver 2005

looking for an urgent reply.

Thanks
Raja

Post #728028
Posted Wednesday, June 03, 2009 6:40 AM
SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Thursday, April 03, 2014 8:27 AM
Points: 4,432, Visits: 4,155
I would think that these results depend a lot on what kind of a machine your testing (single cpu vs. lots of CPU's) and the IO subsystem. WHen you restore 4 databases in parallel you create a lot more IO and write queues are more likely to appear than with just one restore process.
I think you should monitor your system and investigate what is the bottleneck.


Markus Bohse
Post #728104
Posted Wednesday, June 03, 2009 7:01 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, March 12, 2010 7:07 AM
Points: 4, Visits: 16
Hi Markus,

I used to run my code for restoring using

Single Cpu System
1.5 GB RAM
Pentium4 2.4 gig

i want to know does parallel restore in possible and that to faster than sequential restoring.

If possible: will it be faster with more number of Processors.

How can we implement parallelism for each CPU or multicore.

Thanks,
eagerly waiting for your reply
Raja
Post #728137
Posted Wednesday, June 03, 2009 7:15 AM
SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Thursday, April 03, 2014 8:27 AM
Points: 4,432, Visits: 4,155
srajakrishna (6/3/2009)
Hi Markus,

I used to run my code for restoring using

Single Cpu System
1.5 GB RAM
Pentium4 2.4 gig

i want to know does parallel restore in possible and that to faster than sequential restoring.

If possible: will it be faster with more number of Processors.

How can we implement parallelism for each CPU or multicore.

Thanks,
eagerly waiting for your reply
Raja

As I wrote before you should look through performance counters what is your bottleneck. I would imagine that having more than one CPU will be faster, but if IO is your bottleneck then adding extra CPU's won't make a difference.
Also where are your backupfiles stored, what kind of RAID if any are you using, what edition of SQL Server are you using, etc.
Lot's of things which have an impact on the overall performance.
So to answer your questions is it possible to resotre several database in parallel? Yes it is, as you already proved yourself.
Is it faster than serial restore ? It depends.


Markus Bohse
Post #728158
Posted Wednesday, June 03, 2009 7:55 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, March 12, 2010 7:07 AM
Points: 4, Visits: 16
Hi Markus,

iam using

Sqlserver 2005 Enterprised Edition
RAID [you mean if i have better RAID in my harddisk it will support my task](gone through it pretty fast like RAID-5 faster Read operation)

Thanks,
Raja

Post #728201
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse