Documentos de Académico
Documentos de Profesional
Documentos de Cultura
http://weblogs.sdn.sap.com/pub/wlg/26775?utm_source=feedburner&ut...
Blogs
Intro
Parallel processing is not a new concept, but one that is regularly overlooked when it comes to increasing ABAP performance. Why? Your SAP system will (normally) have more than one process available at any given time. Still, most of us insist on using just one of them. This is a bit like a manufacturer relying on only one truck to bring the products from his plant to the shopping malls, when there's a whole fleet of trucks just standing by! Not only that, but most SAP systems spans more than one application server, each with a range of (hopefully) available processes. So, what are we waiting for?
1 of 6
07/10/2011 17.56
http://weblogs.sdn.sap.com/pub/wlg/26775?utm_source=feedburner&ut...
What happens when the aRFC finishes, is the following: Control is passed back to the calling program The form (or method) specified in the CALL TRANSACTION statement (addition PERFORMING ... ON END OF TASK) is called. This form enables you to retrieve any returning or exporting parameters from the called RFC, and use them in the main processing.
By splitting the workload into sizeable chunks, we can execute a multitude of workloads simultaneously, thereby reducing the total execution time to a fraction of the time traditionally used. In my example, I was able to run this report in less than 5% of the time it took running it in one single process. The program and function module are presented below. I've done my best to insert comments in order to explain what's going on, and hope you can use this as a template. The function module has been created as an RFC function (check the Remote-Enabled Module box on the Attributes tab). Besides this, there's nothing special about it.
2 of 6
07/10/2011 17.56
http://weblogs.sdn.sap.com/pub/wlg/26775?utm_source=feedburner&ut...
3 of 6
07/10/2011 17.56
http://weblogs.sdn.sap.com/pub/wlg/26775?utm_source=feedburner&ut...
As you can see, the run time is dramatically reduced. Total system load may amount to the same (and should actually be slightly higher, with the overhead of the separate RFC's), but it's the total execution time that counts. Here, the execution time is roughly 10% when using asynchronous RFC's as compared to a classical "one-in-all" process. The above tests were run in a system with approximately 35.000 entries in BKPF, and 100.000 in BSEG.
Additional reading:
In addition to the blogs and resources mentioned at the start, the following is worth checking out: Horst Keller: Application Server, what Application Server?
Trond Stroemme
Did you try it? What's your experiences? Do you have additional insights? Anything unclear? Let me know! Comment on this weblog Showing messages 1 through 3 of 3. Titles Only Main Topics Oldest First
4 of 6
07/10/2011 17.56
http://weblogs.sdn.sap.com/pub/wlg/26775?utm_source=feedburner&ut...
2011-10-07 05:15:23 Michelle Crapo Business Card [Reply] <Sigh> Our basis people tend to frown on using all their App Servers on one program. Although it might be fun to bug them a little, we rely on them too much. That's why I haven't tried this. Do you have any ideas on that? Maybe it's OK to do this, when the program is a fast one. But that's the purpose right? Your program is long running.
Thanks for the answers to my questions - they may be found in the other blogs that I will get to shortly!
Michelle Nice reminder and I love examples with pictures! 2011-10-07 05:31:35 Trond Stroemme Business Card [Reply] Hi, I believe a decent approach would be to maximize the number of sessions to 3-5, based on the available number of sessions in the system. If you look at the program code, it investigates the number of free sessions by calling function SPBT_INITIALIZE, which provides max number of sessions and free sessions.
I would advice - as a general principle - to limit your development to using 25% of the free sessions, but this is dependent on other factors as well, such as whether the development is run during high system loads (daytime, lots of users logged in, and so on...) Obviously, running during low-load periods would allow you to eat more free processes!
By using SPBT_INITIALIZE and setting the limit well below the number of free/max sessions, I think you should end up being on the safe side. And, of course, this technique should be limited to the (hopefully very few) developments that really are both demanding on resources and mission-critical in terms of run time.
Discussing and establishing a framework for these kinds of developments with Basis beforehand is anyway a good idea!
Cheers, Trond Nice reminder and I love examples with pictures! 2011-10-07 05:40:50 Michelle Crapo Business Card [Reply] Excellent! I'll have to try it. I WILL talk with BASIS first. They are my friends. Especially when I break something in the system. What I say? It happens sometimes. They weren't real happy we did Web Dynpro before letting them know. And you'd have to talk with a BASIS person to know exactly why that was. I sort of remembered the answer I got. Thank you for the nice blog! (And comment)
Michelle
5 of 6
07/10/2011 17.56
http://weblogs.sdn.sap.com/pub/wlg/26775?utm_source=feedburner&ut...
6 of 6
07/10/2011 17.56