locked
Single or multiple workflow instances RRS feed

  • Question

  • Hi All,

    I need to know as how costly(performance,COU utilisation) is to create a new workflow instance to create a new job, Vs using a same workflow instance to do the jobs one by one.

    I plan to have 10000 jobs, so is multiple workflow instances or sequential single workflow instance is more suitable

    Kindly respond

    Cheers

    TicArch

    Friday, April 23, 2010 5:24 PM

Answers

  • Hi, TicArch

    I don't think it is a good idea to have so many workflow instance running simultaneously. Because, every workflow instance(WorkflowApplication) runs in a separated thread, and each thread gets 1MB of memory address reserved. Creating and destroying a thread are not cheap.

    You can create and schedule 20 workflow instances, each one will handle 500 jobs. I don't know what is your exact workflow logic. but my suggestion is, don't create too many workflow instances simultaneously,

    Regards


    This posting is provided "AS IS" with no warranties, and confers no rights. Microsoft Online Community Support
    • Marked as answer by TicArch Friday, April 30, 2010 8:38 AM
    Friday, April 30, 2010 7:43 AM

All replies

  • Hi,

    ->"I plan to have 10000 jobs"

    Are these jobs relative to each other?

    Will these 10000 jobs run simultaneouly?


    This posting is provided "AS IS" with no warranties, and confers no rights. Microsoft Online Community Support
    Monday, April 26, 2010 10:07 AM
  • Hi, these jobs needs to run simultaneously. Each job will excute one seperate activity which will have no impact on another job. Cheers TicArch
    Tuesday, April 27, 2010 5:55 AM
  • Hi, TicArch

    I don't think it is a good idea to have so many workflow instance running simultaneously. Because, every workflow instance(WorkflowApplication) runs in a separated thread, and each thread gets 1MB of memory address reserved. Creating and destroying a thread are not cheap.

    You can create and schedule 20 workflow instances, each one will handle 500 jobs. I don't know what is your exact workflow logic. but my suggestion is, don't create too many workflow instances simultaneously,

    Regards


    This posting is provided "AS IS" with no warranties, and confers no rights. Microsoft Online Community Support
    • Marked as answer by TicArch Friday, April 30, 2010 8:38 AM
    Friday, April 30, 2010 7:43 AM
  • That's it. That's the answer which nobody was answering that how much an blank instance of wokrflow will take in memory.Thank you very much.

    Can you please share as how much extra burder will happen on CPU(% utilisation).

    Now i am thinking of calling workflow and sending one order ID to process, One workflow instance will be created for this, it will process the order and then will go to start activity to receive one more order Id. Will this be fine if i call workflow asynchronously and sending order ID one by one for processing.

    Thanks again

    Cheers

    TicArch

     

    Friday, April 30, 2010 8:43 AM