DATA Step, Macro, Functions and more

Real Time vs CPU time

Reply
Occasional Contributor
Posts: 7

Real Time vs CPU time

Dear SAS

 

What is the difference between Real Time and CPU Time?

 

What makes the one faster than the other? I have noticed in my log that sometimes when a data step runs quickly the CPU Time can be longer than the Real Time, but on the long/large run times the Real Time is always very much longer than the CPU Time.

 

Thanks for you help!!

Occasional Contributor
Posts: 19

Re: Real Time vs CPU time

Quick/simple answer, but I am sure someone will provide a far more technical response.

Real Time is the actual, real world, time that the step takes to run and will be the same as if you timed it with a stopwatch (not possible as you won't know the precise moment the step starts and stops).

CPU Time is the amount of time the step utilises CPU resources. If the machine on which the step is running has only a single CPU then the total CPU time would always be less than than the real time.

However, with multiple processor machines, the load is spread across multiple CPU's and the total CPU time (as reported on the log) may be longer than the real time, e.g. a data step may take 2.6 seconds of real time to execute but the load is spread across 4 CPUs, utilising 1 second of resource on each, so the CPU time will be 4 seconds, i.e. 1.4 seconds longer than the real time.

The nature of the step will heavily influence the real and CPU times, processing data will utilise the CPU but data i/o will increase real time as the data is read from and written back to disk.

There is a lot of information about performance techniques, utilising in-memory processing, etc., available on the web.

Hope this helps.

Cheers

Chris
Occasional Contributor
Posts: 7

Re: Real Time vs CPU time

Thanks Chris



This really helps a lot!!



Have a great day.



C.


Super User
Posts: 10,537

Re: Real Time vs CPU time

You might be interested in setting the system option FULLSTIMER for some jobs to show more performance related information. The default setting is usually NOFULLSTIMER .

 

If interested add:

 

options FULLSTIMER;

before the data step or procedures you are interested in.

Occasional Contributor
Posts: 7

Re: Real Time vs CPU time

Awesome - thanks a lot for the info.



Much appreciated.



C.


Ask a Question
Discussion stats
  • 4 replies
  • 4068 views
  • 8 likes
  • 3 in conversation