Show TOC

Procedure documentationXAL Load Balancing Locate this document in the navigation structure

 

SAP CPS by default defers the decision as to where to run an SAP job to the SAP System that the job is executed on. In other words: submitting a job in SAPGUI or SAP CPS will have the same effect.

The CCMS scheduler will use a simple round-robin method to distribute ABAP jobs over the application servers. This can be sub-optimal, as this does not take into account the relative performance and desired profile of the application servers.

For example, let's say that you have two application servers, one slow system with three batch work processes and a fast system with six batch work processes. The round-robin algorithm used by the ABAP scheduler will only start using the 4th, 5th and 6th work process once the three work processes on the slower system are used up.

With SAP CPS, you can use the SAP derived operating system monitoring data from application servers to determine the best application server for the job. SAP CPS obtains this data over the XAL interface and fills the TARGET_SERVER parameter for you on the job. To enable this you have to configure the XAL interface on SAP System.

The XAL data is calculated over a 5 minute average. If your batch jobs are short and system load varies much more quickly you can also use Agent Load Balancing for SAP (see the documentation shipped with SAP CPS for more information on this feature) as it can provide very quick update rates.

Load balancing over SAP application servers is configured in the Maintain Objects context menu of the SAP System definition in   Environment → SAP System  . Obviously, your instance needs at least two or more application servers in order for SAP CPS to be able to send jobs to the appropriate application server. Every application server can have its own load factors. The SAP CPS dispatcher will use the load factors to set the TARGET_SERVER parameter.

Monitor tree

The system will create a monitor value containing the number of running jobs for every application server named

???/RW_SAP/SAP_ApplicationServers/<app_server>

If, for instance, one system should handle three times more jobs than the others, you set the multiplier to 1 on it and 3 on the others. The threshold defines when no more jobs should be allocated to the application server: the application server will be considered overloaded when the threshold equals jobs * load factor. An additional threshold field, named Load Threshold on the SAP Application Server tab, allows you to specify when the entire SAP System should be considered overloaded by SAP CPS, this can be set on the process server as well as on individual application servers and once reached, it will set the process server of the SAP System to overloaded. This allows integration into the Active Monitoring Module.

Note Note

As an SAP System also has a related process server, you might think that you could use the Load Factors tab on the <SID>_ProcessServer window to influence load balancing. This is correct, but it would decide on which SAP System the job would run, not on wich SAP application server within a particular SAP instance. Therefore, this is probably not what you intend to do.

End of the note.

Prerequisites

  • An SAP System with XAL connection data, see XAL interface on SAP System for more information.

  • A monitor tree, generated with System_CreateMonitorTree.

Procedure

Create a load balancing scenario where one application server can handle twice as many jobs as the other one

  1. Navigate to   Environment → SAP Systems  .

  2. Choose Maintain Objects from the context menu of the SAP System.

  3. Expand Application Servers and choose the stronger application server, fill Strong Application Server into the Description field.

  4. On the Load Factors tab, choose New and fill XAL Data into the description field.

  5. In the Multiplier field, enter 1.

  6. In the Threshold field enter the maximum amount of concurrent jobs multiplied by the multiplier.

  7. In the Monitor Value field, enter the name of the application server and choose Save.

  8. Choose the weaker application server, fill Weak Application Server into the Description field.

  9. On the Load Factors tab, choose New and fill XAL Data into the description field.

  10. In the Multiplier field, enter 2.

  11. In the Threshold field enter the maximum amount of concurrent jobs multiplied by the multiplier. So in this case, if you want to allow 5 concurrent SAP jobs enter 10 which is 5 * 2.

  12. In the Monitor Value field, enter the name of the application server.

  13. Choose Save & Close.

To disable an application server, so that SAP CPS no longer sends workload to it

  1. Navigate to   Environment → SAP Systems  .

  2. Choose Maintain Objects from the context menu of the SAP System.

  3. Expand Application Servers and choose the application server to disable.

  4. Check Enabled if the box is checked so that the checkbox becomes empty.

  5. Choose Save & Close.

To force the process server to Overloaded when an application server is overloaded

  1. Navigate to   Environment → SAP Systems  .

  2. Choose Maintain Objects from the context menu of the SAP System.

  3. Expand Application Servers and choose the application server.

  4. Fill the maximum amount of jobs this application server can handle into the Load Threshold field. Note that no other application servers of this instance will receive additional workload until this application server can accept new workload.

  5. Choose Save & Close.

Values

TAB

Field

Description

SAP Application Server

Name

The name of the application server

SAP Application Server

Description

An optional description

SAP Application Server

Load Threshold

The load, jobs * load factor, at which the process server should go into overloaded in SAP CPS, should be higher than the Threshold.

SAP Application Server

Active

Is this application server active

SAP Application Server

Enabled

Is this application server enabled

Comment

Comment

An optional comment

Load Factors

Description

An optional description

Load Factors

Multiplier

The load factor multiplier by which the monitor value will be multiplied. The higher the value, the less likely it is for jobs to get allocated to this instance

Load Factors

Threshold

The load (jobs * multiplier) at which no more jobs are allocated to the application server. Must be lower than Load Threshold on the SAP Application Server tab

Load Factors

Monitor Value

The monitor value to use, it is the same as the application server name

Providers

SAP Application Server Group

The application server group(s) the application server belongs to