BookmarkSubscribeRSS Feed
tangyoulei
Calcite | Level 5
Folks,

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)?

Thanks,
Alex
1 REPLY 1
Doc_Duke
Rhodochrosite | Level 12
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
Duke

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 561 views
  • 0 likes
  • 2 in conversation