What factor influence the CPU time and elapsed time for a Job.

How to do Performance analysis and Capacity Planning for a shop. We also talk about Software Cost here.

Topic author
Kanika
Registered Member
Posts: 21
Joined: Sat Jul 13, 2013 6:31 pm

What factor influence the CPU time and elapsed time for a Job.

Postby Kanika » Tue Dec 15, 2015 10:39 pm

Hi,

I want to know what are the factors which can influence and decide on CPU time and the elapsed time taken by a Job. I have a Job which is running a simple COBOL batch program. This program has a single input file and two output file. The program read the input file and writes to output files.

I execute this Job for five time with same number of input records and keeping all the other things same but in all the runs I get different CPU and elapsed times. Why this happens? I would expect the times to be same. Are there some factors influencing the CPU time and elapsed time apart from the obvious. Please enlighten me.



Online
User avatar

Robert Sample
Global Moderator
Global Moderator
Posts: 1275
Joined: Fri Jun 28, 2013 1:22 am
Location: East Dubuque Illinois
Has thanked: 2 times
Been thanked: 90 times

Re: What factor influence the CPU time and elapsed time for a Job.

Postby Robert Sample » Tue Dec 15, 2015 10:51 pm

CPU won't usually vary much for a given job -- but the system records it to much greater precision that the JES2 or JES3 output will show. Hence you may see slight variations in CPU time but you won't generally see huge differences. If you see more than .1 or .2 CPU second difference between jobs, there's probably something else going on to impact CPU time.

Elapsed time, however, is a totally different story. Elapsed time depends upon the number of address spaces (batch jobs, TSO users, started tasks and possibly OMVS processes) executing in the LPAR, their relative priorities compared to yours, how busy the CPU is, the WLM (Workload Manager) policy, and so forth. I have seen jobs that run in 2 minutes when the system is not busy take more than 5 hours when the CPU is running 100% -- even though the CPU time was within .1 second of the same.




Topic author
Kanika
Registered Member
Posts: 21
Joined: Sat Jul 13, 2013 6:31 pm

Re: What factor influence the CPU time and elapsed time for a Job.

Postby Kanika » Fri Mar 25, 2016 1:48 pm

Robert Sample wrote:CPU won't usually vary much for a given job -- but the system records it to much greater precision that the JES2 or JES3 output will show.  Hence you may see slight variations in CPU time but you won't generally see huge differences.  If you see more than .1 or .2 CPU second difference between jobs, there's probably something else going on to impact CPU time.

Elapsed time, however, is a totally different story.  Elapsed time depends upon the number of address spaces (batch jobs, TSO users, started tasks and possibly OMVS processes) executing in the LPAR, their relative priorities compared to yours, how busy the CPU is, the WLM (Workload Manager) policy, and so forth.  I have seen jobs that run in 2 minutes when the system is not busy take more than 5 hours when the CPU is running 100% -- even though the CPU time was within .1 second of the same.

Thanks!
If I want to calculate the CPU time consumed by a job, then should I rely on the CPU time shown in the SYSOUT of the job or I should look for some other place?



Online
User avatar

Robert Sample
Global Moderator
Global Moderator
Posts: 1275
Joined: Fri Jun 28, 2013 1:22 am
Location: East Dubuque Illinois
Has thanked: 2 times
Been thanked: 90 times

Re: What factor influence the CPU time and elapsed time for a Job.

Postby Robert Sample » Fri Mar 25, 2016 4:39 pm

The quick and easy and hence not very accurate way is to look at the job output.  If you want more detail the SMF type 30 record is generated at the end of the job and it has LOTS of detail.  It may not be accessible to applications people at your site, though.
And your post said CPU time as if it is a single number.  It is actually multiple numbers (TCB, SRB, zAAP, zIIP) that are combined to be called "the" CPU time for the job.




Topic author
Kanika
Registered Member
Posts: 21
Joined: Sat Jul 13, 2013 6:31 pm

Re: What factor influence the CPU time and elapsed time for a Job.

Postby Kanika » Fri Apr 29, 2016 12:14 pm

And your post said CPU time as if it is a single number. It is actually multiple numbers (TCB, SRB, zAAP, zIIP) that are combined to be called "the" CPU time for the job.
So I need to calculate all these to get the CPU time or look at the CPU time from SYSOUT?

ANd Where are these factors shown for a job run?



Online
User avatar

Robert Sample
Global Moderator
Global Moderator
Posts: 1275
Joined: Fri Jun 28, 2013 1:22 am
Location: East Dubuque Illinois
Has thanked: 2 times
Been thanked: 90 times

Re: What factor influence the CPU time and elapsed time for a Job.

Postby Robert Sample » Fri Apr 29, 2016 4:19 pm

 The CPU time on SYSOUT is TCB and SRB if I recall correctly.  The source for good CPU data is the SMF records - for a batch job, type 30 subtype 4 / 5 (step / job termination records).




Return to “Mainframe Performance, Capacity Planning and Software Cost.”

Who is online

Users browsing this forum: CommonCrawl [Bot] and 0 guests