Finding the List of DS jobs Consuming More CPU on the Server

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
synsog
Premium Member
Premium Member
Posts: 232
Joined: Sun Aug 01, 2010 11:01 pm
Location: Pune

Finding the List of DS jobs Consuming More CPU on the Server

Post by synsog »

Requirement : Try to find out the Running DS job , which is consuming more CPU On the DS Server.

Method adopted to achive the Requirement:

STEP-1: Try to get the CPU stats using VMSTATS command. If the cpu usage is grater than the Threshold limit(say 85%) based on the ouput from VMSTAT then
STEP-2: Try to grep the list of processes that consumes more CPU using the command "ps aux | head -1; ps aux | sort -rn +2 | head -10".
STEP-3: To grep he list of Processes more specific to Datastage. We are using the below commands to grep the same.
a. ps aux|head -1;ps aux|grep dsuserid1l|sort -rn +2|head -10
b. ps aux|head -1;ps aux|grep dsuserid2|sort -rn +2|head -10
dsuserid1/dsuserid2(unix id's) are the two different user id's that we use to run any fo the DS jobs on the DS Server

STEP-4: Try to get the list of running jobs on DS server suing the command "ps -ef| grep DSD.RUN"


Challenge we are facing.: Not able to tage PID's grepped in STEP-3 & 4
When i execute the command "proctree <DS job process id grepped in STEP-4> " on DS server I am able to see the process tree starting form the Respective job till "dsrpcd" deamon , but not able to see any of the process grepped in Step-3 and Viceversa(not able to see the parent id of the process grepped in step-3 so that it can be tagged to Jobs grepped in step-4)..


The Method i have adopted might be wrong. Request you to please provide me your valuable inputs
priyadarshikunal
Premium Member
Premium Member
Posts: 1735
Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI

Post by priyadarshikunal »

Can you please let us know the operating system i.e. unix flavor?
Priyadarshi Kunal

Genius may have its limitations, but stupidity is not thus handicapped. :wink:
synsog
Premium Member
Premium Member
Posts: 232
Joined: Sun Aug 01, 2010 11:01 pm
Location: Pune

Post by synsog »

Its AIX 3 oslevel - 5.3.0.0
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

A lot of the processes started by a job are owned by PID 1. So you cannot use the process tree. If you can find all the PIDs created by a job. So can find some of the PIDs because they have the jb name in the process name. I really do not think this is helpful. The individual processes are not going to change much if the job is designed correctl. I would stay focused on the jobs running. If you can figure out how much CPU and RAm is used by each job then you can try to stay under 100% CPU and minimized paging.
Mamu Kim
synsog
Premium Member
Premium Member
Posts: 232
Joined: Sun Aug 01, 2010 11:01 pm
Location: Pune

Post by synsog »

Kim,
Thanks you for your valuable inputs and prompt response.
The challenge here is we are not able "figure out how much CPU and RAm is used by each job, so that we can try to stay under 100% CPU".

Just a FYI-- We have multiple DS projects(owned by various applicaiton teams) running on the Same DS server. As an extension to our requirement, we thought to figure out the DS project of the respective Job, which is consuming more CPU/RAM.
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

If you store all of "ps -ef" in a table. You have all of the PIDs in the log if you turn on show PIDs. Just add up the process size of all the PIDs to get the RAM used by one job.

CPU can be averaged of all the times a job runs minus all the other jobs running as well. A lot more difficult to get because so many jobs run at the same time. If you can ever catch a job by itself then you got one job.
Mamu Kim
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

DataStage has within itself Resource Estimator and Performance Analysis tools. Performance Analysis does, if I recall correctly, show PIDs.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply