Add-Innovation Home

About Add-Innovation

Contact Us

  SAS Institute logo.    Options to help track cpu and memory

When implimenting any efficiency improvements, it's worthwhile tracking the changes by looking at the information in the SAS Log. Several options are available which help with this ;

STIMER Specifies if timing statistics are displayed after each data and proc step.
This option is the default, and must be specified at SAS invocation time.
By default, the time shown is the CPU time associated with the step.
FULLSTIMER
or
FULLSTATS
Specifies if additional performance statistics are output to the log after each data or proc step.
NoFullSTimer is the default. This option is disabled if NOSTIMER is in effect.
Statistics vary according to the operating system that SAS is running on.
Examples of stats shown are CPU Time, and Elapsed Time.
Depending on the operating system, this option may also show additional memory information.
MEMRPT Writes memory usage statistics.
STATS Enables or disables the reporting of the above stats in the log.

Examples of use ;

Default : STATS, STIMER and MEMRPT turned on ;

1    data abc;                                                
2       do i=1 to 10000000;                                   
3          x=sqrt(i);                                         
4       end;                                                  
5    run;                                                     
                                                              
NOTE: The data set WORK.ABC has 1 observations and 2 variables.
NOTE: The DATA statement used 3.62 CPU seconds and 14094K.    

Turning off STIMER, would remove the statement relating to CPU time.
Turning off MEMRPT, would remove the deail about the memory usage.
Turning off STATS would remove both.

Using the FULLSTIMER option ;

12   options fullstimer;                                        
13   data abc;                                                  
14      do i=1 to 10000000;                                     
15         x=sqrt(i);                                           
16      end;                                                    
17   run;                                                       
                                                                
NOTE: The data set WORK.ABC has 1 observations and 2 variables. 
NOTE: The DATA statement used the following resources:          
      CPU     time -         00:00:03.55                        
      Elapsed time -         00:00:04.49                        
      Vector affinity time - 00:00:00.00                        
      Vector usage    time - 00:00:00.00                        
      RSM Hiperspace  time - 00:00:00.00                        
      EXCP count   - 16                                         
      Task  memory - 5903K (58K data, 5845K program)            
      Total memory - 14137K (3488K data, 10649K program)