1 Using SAS Parallel-Processing Features To Reduce Program Execution Time Presented by Berwick Chan Kaiser Permanente Vaccine Study Center NCAL Division of Research October 2009 For BASAS October 2009 meeting
2 MP in SAS Starting in version 6, SAS introduced multi-processing feature Starting in version 9, SAS introduced a new SPD engine that provide multi- thread processing power
3 MP-Connect Provided by the SAS-Connect module Uses default SAS engine LIBNAME libref 'SAS-data-library Allows independent tasks / steps within the same SAS program to be executed concurrently Requires additional programming
4 SPDE Engine Uses Scalable Performance Database Engine LIBNAME libref spde 'SAS-data-library' Provides multi-thread process automatically Requires no additional programming Requires additional setup process for SAS library / table
5 SAS (Default) Processing Flow SAS starts Task 1 Task 2 SAS ends Execution Time X seconds y seconds Total: (x+y) seconds
6 SAS MP Processing Flow SAS starts SAS ends SAS starts Task 1 SAS ends Execution Time Task 2 Task1Task 2 x sec y sec Total exec time: max(x,y) sec
7 Sequential / MP Process Comparison Program executed in sequential process Program executed in MP Result: MP version takes about 59% execution time of the sequential version (34.78 sec vs sec), a 41% savings.
8 More About MP-Connect Provides a new set of SAS commands Enables communications among concurrent sessions / tasks: –Work libraries sharing –Macro variables passing –Session status checking –Pipeline parallelism (using SASESOCK engine) Manages computer resource more efficient across systems
9 More About MP-Connect Not applicable to all programs, good for running independent tasks within the same program. Ideal applications: –Production jobs with short update windows –ETL applications that access different databases –Online applications that demand quick response Performance enhancement on individual program may vary and is depending on system resource availability during program execution
10 More About MP-Connect Useful links: