Threading...

A common question that I get asked is.. how do we force multi-threaded conversion jobs to split the key ranges evenly across each thread instance?

Unfortunately I don't have an easy answer. The base conversion jobs seem to take a simplistic approach of using the low and high override values (if supplied, otherwise they use values of 0000000000 and 9999999999) and then divide these by the number of threads to determine the ranges for each instance.

But.. We have found that we can force a predefined range of values and simulate threading but having separate batch controls defined for each thread, with predefined high/low values and these can then be run concurrently through standard batch submission processes.. e.g..
if we want to run VAL-ACCT in 4 threads and ensure that a known range of source keys between 0000000001 and 0000100000 is split between the 4 threads, we clone the existing batch control into
VAL-ACCT1, with OVRD-LOW-ID = 0000000001 and OVRD-HIGH-ID = 0000025000
VAL-ACCT2, with OVRD-LOW-ID = 0000025001 and OVRD-HIGH-ID = 0000050000
VAL-ACCT3, with OVRD-LOW-ID = 0000050001 and OVRD-HIGH-ID = 0000075000
VAL-ACCT4, with OVRD-LOW-ID = 0000075001 and OVRD-HIGH-ID = 0000100000

These four jobs can then be submitted alongside each other with Thread Number and Thread Count both set to 1, with no chance of them being rejected by the framework (this normally restricts the same batch control from running more than once at a time). The actual number of instances and the thread ranges of each will need to be adjusted in the same way as we normally do for our optimisation tasks, it is just a little harder since we have to adjust the batch control parameters rather than just the thread counts.
Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

Stuart Ramage

I am a Consulting Technical Manager for Oracle Corporation, and a member of the OU Black Belt Team, based in Hobart Tasmania.
I have worked in the Utility arena since 1999 on the Oracle UGBU product line, in a variety of roles including Conversion, Technical and Functional Architect.

Contact me on:

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today