IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

CPU Time and Elapse Time


IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ilakkia
Warnings : 1

New User


Joined: 17 May 2008
Posts: 28
Location: chennai

PostPosted: Fri Aug 08, 2008 12:13 pm
Reply with quote

Please explain the difference between the CPU time and Elapse time?

What are all the various factors that constitute the Elapse time?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Aug 08, 2008 12:22 pm
Reply with quote

Elapsed = Clock
CPU = amount of time CPU was utilised
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Fri Aug 08, 2008 12:48 pm
Reply with quote

Continued...

CPU time is the time for which the CPU was busy executing the task. It does not take into account the time spent in waiting for I/O (disk IO or network IO). Since I/O operations, such as reading files from disk, are performed by the OS, these operations may involve noticeable amount of time in waiting for I/O subsystems to complete their operations. This waiting time will be included in the elapsed time, but not CPU time. Hence CPU time is usually less than the elapsed time.

But in certain cases, the CPU time may be more than the elapsed time !When multiple threads are used on a multi-processor system or a multi-core system, more than one CPU may be used to complete a task. In this case, the CPU time may be more than the elapsed time.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Fri Aug 08, 2008 2:58 pm
Reply with quote

Under z/OS, there are typically hundreds of tasks running simultaneously on any given system. These include started tasks (which would include DB2, MQ series, Websphere, system tasks), TSO users, batch jobs, CICS regions. The system manages these tasks and allows each to run for a certain amount of time each minute. CPU time is the amount of time the task is actually executed for while elapsed time represents the total amount of time the task has been around. The ratio between CPU and elapsed time can run from close to 1:1 (for a high-priority task running with no other work being done) to 1:100 (or higher) for a heavily loaded system with a low-priority task.

It may not be possible to fully describe all the factors that constitute elapsed time, but for a batch job here are some of them:
CPU utilization
Number of jobs in system
System overhead
Initiators in use
Tape contention
Disk contention
Channel contention
Job priority
WLM policies

And there is a minimal correlation between CPU time and elapsed time. The exact same job can use the exact same about of CPU time and the elapsed time may vary by hours -- due to the above-mentioned factors, among others.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Aug 08, 2008 10:15 pm
Reply with quote

Hello,

As has been mentioned before, elapsed time itself is not a "tunable" parameter.

Elapsed time can be altered by tuning (positively or negatively) things in the environment (like reducing i/o, gettng a faster cpu, tuning database design and query structure, and on and on and on) or by tuning specific things in the process itself.

One situation that i see more and more frequently is some "requirement" that causes thousands or millions of records to be handled 3, 5, or more times just allow the requirement to be met "with a jcl". Sometimes there are multiple utility and/or sort steps requiring incredible amounts of system resources just so some small bit of program code can be avoided.

And once implemented they will not perform satisfactorily. . . And have a major impact on other processes in the system.
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Fri Aug 08, 2008 11:45 pm
Reply with quote

Quote:
the factors that constitute elapsed time,


Elapsed time is also referred to 'wall clock time'... the rate cannot change, as time is constant. I think you meant "the factors that influence the elapsed time".
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Fri Aug 08, 2008 11:50 pm
Reply with quote

Judging by some of the questions in some of the forums, I think some people are writing rexx programs to schedule other jobs. I am assuming there is a lot of waiting for jobs to end. That is, in a scheme like that, the master would sleep most of the time, waking up every few minutes to see if a job ended. Elapsed time may be high, but CPU time low.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> All Other Mainframe Topics

 


Similar Topics
Topic Forum Replies
No new posts To get the the current time DFSORT/ICETOOL 13
No new posts RC query -Time column CA Products 3
No new posts C Compile time time stamps Java & MQSeries 10
No new posts Parallelization in CICS to reduce res... CICS 4
No new posts Insert system time/date (timestamp) u... DFSORT/ICETOOL 5
Search our Forums:

Back to Top