Larger productive systems have multiple application servers to spread the workload. But if the system is not configured properly one application server can be overloaded while others are almost idle. This blog will explain the load balancing settings.
Questions that will be answered are:
- How can I check my current load balancing situation?
- How can I load balance SAP GUI users?
- How can I load balance SAP to SAP RFC traffic?
- How can I load balance external system to SAP RFC traffic?
- How can I load balance qRFC traffic?
- How can I load balance batch jobs?
- How can I load balance web traffic?
- How can I configure MRP parallel processing settings?
- How can I validate if load is properly balanced?
How to make parallel processing settings
Parallel processing settings are explained in this blog.
How to check current situation of load balancing
You can start transaction AL08_OLD (in older systems AL08) to get an overview of the distribution of your logged on users and how they are spread over the application servers:
Load balancing for GUI logon
With transaction SMLG you can setup logon groups that can be used for SAP GUI logon and RFC logon. In the details of each logon group you can make dedicated settings:
The Fav.Typ setting indicates the load balancing mechanism (round robing, best performance, weighted round robin). Set Ext RFC-enabled to also do load balancing in this group for external RFC calls.
You can set limits per application server on response time and amount of users. This limit is not a hard limit, but a soft limit to influence the quality calculation. The setting is per application server and it is across the logon groups (you cannot make settings per logon group). The background of these limits is explained in OSS note 118093 – Concepts of defining ‘limits’ in logon load balancing and on the SAP wiki page.
In SMLG you can choose menu option Goto / Load distribution to get an overview of the current load distribution and quality:
A higher quality number means it has the best quality. New users that logon will be routed to this server if you have set the SMLG settings to Best Quality.
Relevant OSS notes:
- 2868180 – LG: IPv6 enabled logon groups with missing application server info
- 3083069 – SMLG: strengthen the validation for alternative IP address field
RFC traffic load balancing for SAP to SAP connections
For SAP to SAP connections using RFC you have to set the load balancing to Yes in SM59 and fill out the proper message server and logon group details:
RFC traffic load balancing for external system to SAP connections
Many external systems connect to SAP via the SAP JCO connector. The JCO connector can do load balancing, if configured properly. The problem here is that the developers form the other application using JCO have no idea on the settings to be made. The other problem is that on a development system the settings are typically pointing to one server only and the basis team did not configure load balancing. Now suddenly in production (or in a quality environment) they have to switch to load balanced settings using different parameters.
The parameters settings to be made are explained in:
- OSS note 2508036 – JCo connection is not load balanced, connection always get redirected to one dedicated ABAP server
- Several product sites of product providers that use JCO, example Mulesoft
Tips for basis team:
- Also setup the logon group in development system and assist the external team with the needed settings. The best way is that the external team uses load balancing settings from the start in development as well
- Setup extra application server in quality landscape to test load balancing
RFC server group
With transaction RZ12 you can setup RFC server groups that also can be used for load balancing purposes.
RFC load balancing for qRFC
If you use qRFC (this is used for example in the CIF interface to SCM and EWM), then you need to configure the RFC group (settings made in RZ12) in transactions SMQS and SMQR. See blog on qRFC.
Web traffic load balancing
For web traffic load balancing, you have to set up the SAP web dispatcher. In the SAP web dispatcher you can configure to which back-end application servers to use.
Batch job load balancing
Batch job load balancing can be done by setting up batch job server groups in transaction SM61. See this blog.
MRP run parallel processing
The MRP run (material requirements planning) is a very intensive process from the system perspective and very important from business perspective. It is important that the MRP run finishes in time, but is also should not overflow the system by occupying all work processes and CPU. In this customizing action you can defined the MRP run parallel processing settings:
Now you can assign the specific application servers that the MRP run is allowed to use in parallel and the maximum amount of work process it can use:
User measurement load balancing
User management transaction USSM can cause significant load on the system. Apply OSS note 3028252 – USMM2: Background Jobs Lastverteilung and the settings to have the user measurement program jobs load balanced.
How to validate correct load balancing?
To check if load balancing has done its job, go to transaction ST03, and open the section Load History and Distribution, Instance comparison, then the time frame:
Check that the load is evenly distributed among the application servers. The central instance will off course have a different load profile.
Troubleshooting OSS notes and blogs
The following OSS notes can be useful for troubleshooting:
Useful background blogs: