Parallel Restoring of database

  • 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

  • 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.

    [font="Verdana"]Markus Bohse[/font]

  • 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

  • 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.

    [font="Verdana"]Markus Bohse[/font]

  • 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

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply