Help using Base SAS procedures

any example to show speed enhancement by parallel programming?

Posts: 1

any example to show speed enhancement by parallel programming?


I am learning the parallel programming technique to take advantage of multi- processor computers.

I understand that the speed of the code could be bounded by CPU or I/O.
I've read some article mentioning a rule of thumb that if the CPU time of the original code is more than 25% of the real time, the speed would be improved by parallel processing.

So I picked a code of data step that CPU time is about 80% of the real time (17min vs. 22min). What I did was to split the data into two similar sized pieces. Then I ran the data step on both pieces in the way of parallel programming (buy using rsubmit/endrsubmit).

The result was surprising that the new code cost me about 45min!

From the log, I see each thread took about the same CPU time as before (15min and 16min) but much longer real time (31min and 47min) than the original 22min.

The only reason I can think of is the I/O and network jam (the data step does a hash merge against data on server)

My question is: who can give me some practical examples that take speed advantage of this kind of multi-thread parallel programming, in this rsubmit/endrsubmit way, on one multi-processor computer (like a core2duo)?

Trusted Advisor
Posts: 2,113

Re: any example to show speed enhancement by parallel programming?

I seriously doubt that splitting the data on a CPU bound job is going to help. The DATA step is single-threaded; and you are tripling the number of steps and more than doubling the disk I/O.

SAS already does a lot of multiprocessor optimization. I doubt that you would beat it with hand coding.

Doc Muhlbaier
Ask a Question
Discussion stats
  • 1 reply
  • 2 in conversation