Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Parallel Restoring of database


Parallel Restoring of database

Author
Message
srajakrishna
srajakrishna
Forum Newbie
Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)

Group: General Forum Members
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
MarkusB
MarkusB
SSCarpal Tunnel
SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)

Group: General Forum Members
Points: 4449 Visits: 4208
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
srajakrishna
srajakrishna
Forum Newbie
Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)

Group: General Forum Members
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
MarkusB
MarkusB
SSCarpal Tunnel
SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)

Group: General Forum Members
Points: 4449 Visits: 4208
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
srajakrishna
srajakrishna
Forum Newbie
Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)

Group: General Forum Members
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
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search