Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Parallel processing using Asynchronous RFC issue

Former Member
0 Kudos

Hello all,

I have implemented parallel processing using ASYNCHRONOUS RFC i.e CALL FM.. STARTING NEW TASK PERFORMING zz AT END OF TASK.

This call is placed in a DO ...ENDDO statement so the FM is being called many times (at least 20 times ) in parallel.

The server on which these FM runs have 20 Dialog processes available but i see only 10 of them are being used. So basically even if there are 10 free WP, later 10 RFC calls are queued up. I obviously would want all the WPs that are free to be consumed .

Can someone tell me if how many RFC calls are to be called, is maintained in any system parameter in RZ11?  If yes then what is that ?

My second question is  in this case, later 10  RFC calls are queued up. can i see this queue anywhere ?

Appreciate any pointers here.

Thanks in advance.

BR

Nilesh

5 REPLIES 5

Former Member
0 Kudos

Nilesh,

Normally when you want to use parallel processing, you should use the the FM SPBT_INITIALIZE. When you specify the group, the FM will return the maximum # of WPs and the # of free WPs available in the server group.

Try this and see if your calculation of # of free WPs and the result from the FM is the same.

As far as aRFC goes, I don't think there is any way to monitor the queued calls although you can do this for tRFC using SM58 and qRFC using SMQ1/SMQ2.

Thanks,

Vikram.M

naimesh_patel
Active Contributor
0 Kudos

You must restrict the consumption of WP only on specific server group. This would make sure that your program is not end up consuming all the WP and have every one else waiting.


The server on which these FM runs have 20 Dialog processes available but i see only 10 of them are being used. So basically even if there are 10 free WP, later 10 RFC calls are queued up. I obviously would want all the WPs that are free to be consumed .

You DONT want to consume all of the free WP. The Parallel Processing (PP) consumes the Dialog WPs. so, if you consume all - No other User would be able to start a new transaction or login.

Additionally, you want to restrict on how much WP can be consumed by your program. Also, you would need to consider into the account, that the same main program can be ran multiple times simultaneously. So, if your program consumes all of them, it would be a big big issue.

You must caution and put more and more control (most WP per user, least wait time, least polling time for new WP).

Regards,
Naimesh Patel

0 Kudos

Hi Naimesh,

To add to your point, i think I had read to restrict the WP to max of 4 or 5. So as to make sure enough WP are present for rest of the processes.

Consuming all the WP or even in this particular case using 10 itself poses a big threat i guess.

~Tanmay.

Former Member
0 Kudos

Dear Vikram, Naimesh & Tanmay,

Thanks for the suggestions. I forgot to mention that the server on which we are running this program is dedicated to this activity for 2 users including me so there is no concern of any other user and processes.

I didn't do SPBT_INITIALIZE since i am starting parallel tasks based on the packages( No of records to be processed )  and not on the no of WP available at any moment.

SO for ex. I have 100000 records to process and package size is 10000, then i would trigger 10 RFC calls. I am not going to create parallel jobs each with data = (no of total records to be processed / free WP ). I am not saying this is the correct approach but its just the current design of my program.

Coming back to SPBT_INITIALIZE , i am checking no of free WP in SM51 and see that only some of them are being used while rest WPs are free and waiting. I am sure main program has triggered all the RFC calls and it is now waiting for all of them to finish, in SM 51 i see only few active calls at any time and others i believe, are in queue somewhere while there is a scope to run them.

Any idea what can be done here to maximum utilization of all the WPs at any time ?

BR

Nilesh

Former Member
0 Kudos

Hi Nilesh,

Did you check note 39412 and 39415? These two might help you.

Also.

The number of work processes is initially predefined by the following

system parameters:

   rdisp/wp_no_dia
   rdisp/wp_no_vb
   rdisp/wp_no_vb2
   rdisp/wp_no_btc
   rdisp/wp_no_enq
   rdisp/wp_no_spo
By defining the operating modes, you can dynamically change the
distribution of work processes to services

More info on Operating modes can be found here.

Defining Operation Modes - Configuration - SAP Library

Dynamic Work Processes - Tools for Monitoring the System - SAP Library

Take help from your basis colleague.

R