Multiple Instance question

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
fordxhome
Participant
Posts: 11
Joined: Tue Dec 30, 2003 1:11 pm

Multiple Instance question

Post by fordxhome »

Can you run a multiple instance enabled job on a single CPU (Windows) box? Thanks.
roy
Participant
Posts: 2598
Joined: Wed Jul 30, 2003 2:05 am
Location: Israel

Post by roy »

Hi,
in general the multiple instance job is just like running 2 instances of your internet browser.
the only thing you'll feel having only 1 cpu would be a slower performance perhaps.
when a job is not a multiple instance it means that there can't be more then 1 runing instance of it at the same time, this is enforced by DS when you'll try to run the same job when it is already running.
the same applies to running a multiple instance job with the same invocation id when it is already running.

IHTH
Roy R.
Time is money but when you don't have money time is all you can afford.

Search before posting:)

Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Image
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

Let's pretend you have a job like:

Code: Select all

seq ---> xfm ---> seq
This this job is completely local to the server wrt i/o, there's no reason this job shouldn't run at full steam and utilize a cpu 100%. The job may run at only a few 100's rows/second, but this is a reflection of the work that has to be done for each row. You should see in Performance Monitor that the job is completely consuming a cpu.

Now, if you instantiate the job and run 2 clones simultaneously, you should see both jobs running at 1/2 a cpu each, because the pie has to be split in half. If you have 2 cpus, you should see both jobs each consuming one of the cpus. Because jobs are single-threaded by default, at most a single cpu will be utilized.

When you introduce things like a database, the waters become muddied:

Code: Select all

seq ---> xfm ---> seq
          ^
oci ----->|
You no longer have isolation, and therefore have a network overhead, plus a database row fetch request per row. Now, your cpu utilization will drop, as the job stalls minutely for each row. You could measure the utilization in this design, and perhaps see that the job is using 20% of a cpu. Logic should dictate that you could instantiate this job X 5 in a divide and conquer sense and get back up to utilizing that cpu 100%.

In a Windows environment, which is usually cpu challenged, you will still instantiate, just keep in mind the two examples I showed. If you're running a job like the first, you have little or no resources left for other work. If you're running jobs like the second, you can squeeze in more jobs/instances. This one reason why lots of cpus are better than a single fast one.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
fordxhome
Participant
Posts: 11
Joined: Tue Dec 30, 2003 1:11 pm

Post by fordxhome »

Thank you for your relyies. I have a seq --> xfm -->seq job that is multiple instance enabled. When I tried to run 3 instances concurrently with 'dsjob -run -param...', the first instance ran OK. But the others returned with 'Status code = -2 DSJE_BADSTATE'. What did I do wrong?
Thank you.
fordxhome
Participant
Posts: 11
Joined: Tue Dec 30, 2003 1:11 pm

Post by fordxhome »

I think my problem was not providing invocation id when I ran with 'dsjob -run...'. How do you pass in invocation id as a param? What's the param variable for INVOCATION ID? Thank you.
fordxhome
Participant
Posts: 11
Joined: Tue Dec 30, 2003 1:11 pm

Post by fordxhome »

I got my answer by searching the forum. Sorry for not doing that first.
Post Reply