Search code examples
tibcotibco-business-works

Difference between ThreadCount and StepCount in TIBCO BW Engine


Can anyone explain me the difference between StepCount and ThreadCount property of TIBCO BW Engine . I had tried to understand through TIBCO docs but unable to understand. So, Please if anyone can explain me this would be great . Thanks in advance.


Solution

  • The ThreadCount property defines the amount of threads (java threads) which execute all you processes. So with the default value of 8 threads you can run 8 job simultaneously.

    The StepCount on the other hand defines the amount of activities executed before a thread can context switch into another job.

    Sample scenario:

    • a process with 5 activities
    • ThreadCount is 2
    • StepCount is 4

    If there are 3 incoming requests, the first two requests spawn 1 job each. The third job is spawned, but gets paused due to insufficient threads.

    After the first job completes the forth activity, the thread is freed and can be assigned to another paused job. So the first job will be paused and the third job starts to execute.

    When the second job reaches the forth activity, this thread will be freed and is available for re-assignement. So the second jobs pauses and the first resumes.

    After the third job reaches its forth activity, the thread is freed again and resumes job number one (and completes this one). Afterwards Job number 3 get completed.

    All of this is a theoretical scenario. What you usually need is to set the amount of concurrent jobs (so ThreadCount). The StepCount is close to irrelevant, because the engine will take care of the pooling and mapping of physical threads to virtual BW jobs.