cancel
Showing results for 
Search instead for 
Did you mean: 

Load Balancing in SAP

Former Member
0 Kudos

Hi Experts,

There are 2 instances here, one is CI and other is Dialog instance.

I am a little confused on what basis the users are logged on each instances.


One what basis the message server determines and directs the logon of a perticular user to that perticular instance?

As per my analysis, a report named RSRZLLG0 that provides message server information for load balancing is not scheduled.
Also in SMLG there are 2 groups created for both instances with same group name, and the thresold values for Response time and users are being maintained in each of them.

Also, the CPU Idle time for the central instance is always low (below 30% at times), and I can see more users at the CI than the dialog.

Kindly help me in clearing my doubts.

Regards,
Harikrishna

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

First of all: I know, this is technically necro-posting. I apologize. I will risk the wrath of the moderators since I found a lot of posts on the subject of load-balancing (SMLG) but no documentation on how we can influence the distribution of load/users over the logon-groups in an exact way.

Some people (I take no credit for the documentation following, except the translation bit) I cannot name without their consent, analyzed the whole thing and came up with the following „reverse engineered“ algorithms:

Load-balancing is solely based on the value oft he attribute „quality“ which will be freshly computed every 5 minutes. This value is based with a proportion of 5:1 (note 51789) on the average response time. The average response time though might in some cases not be representative, especially in cases where the share of „normal“ GUI-users is relatively small, compared to RFC- and batch-users (like e.g. early mornings before the GUI-users start showing up). The value „quality“ compares in such a moment a bad average response time, although not representative because lack of GUI users, of one of the instances (lets call it ap1) with the average response time of a second instance (ap2) and continues to send the users to ap2, 99% of which way this goes is random.

SAP knows about this Problem (note 51789). If you do not want to change the proportions in the coding, you can still influence the balancing by defining threshholds in SMLG (attributes behind the logon group). Here’s the algorithm for „quality“

  • Quality = user-part-quality * user-evaluation (1) + response-time part-quality * response time evaluation (5)
  • „part quality“ = rounded: 100 – (100 * actual value of the instance / preset value). In words: how many percent are still missing, until the actual value meets 100% of the predefined threshold? If it’s more, the value is negative.

If you do not define thresholds (attributes in SMLG), the system will react as follows:

  • As an assumed calculated threshold the actual maximum value from all instances in the group will be taken (i. e. every response-time adds to a „good“ quality value, as long as the special effect mentioned in the first paragraph still enables at least one that’s worse)
  • Part quality = part quality + 1
  • If the threshold of the response time is undefined, the user-part-quality will be evaluated 2 times instead of 1 (but not the other way around)

Example:

Before thresholds:

Resonse time

Threshold

User

Threshold

Quality

AP1

876

-

135

-

65

AP2

341

-

332

-

311

After:

Response time

Threshold

User

Threshold

Quality (simulated)

AP1

876

25000

135

100

445

AP2

341

25000

332

100

263

This is an example! NOT A recommendation!!!

Hope this helps.

Answers (9)

Answers (9)

Former Member
0 Kudos

,

Hi,

Please follow this  URL, this may help.

http://help.sap.com/saphelp_nw70/helpdata/en/c4/3a644c505211d189550000e829fbbd/content.htm

1. Call transaction SE11.

2. Select "Data type", type "SMLG3004" and press "Change".      

3. Add the following components:

      -NEW_FAVT with component type RZLLI_FAVT

      -OLD_FAVT with component type RZLLI_FAVT

4. Save and activate this data element.

5. Call transaction SE38 type "SAPMSMLG", select "Text  elements" and press "Change".

6. Enter text-000 = "Save changes?"

7. Save and activate new text element.

 

Header Data

Regards,

Prabhakar

Former Member
0 Kudos

Thanks all for your valuable inputs.

As I have noticed in the last few weeks, the load on the CI as always more as compared to the Dailog instance. More and more requests are taken by CI (may be message server directs it to CI becease of better response time), and less to DI.

This weeks EWA reports says that max CPU load on CI was 48% and that of DI was only 2%.

The diiference is huge.

What I want is both CI and DI should be loaded equally (hence more efficient).

How do I do that? Kindly suggest.

Regards,

Harikrishna

Former Member
0 Kudos

Hi,

In order to check the Load Quality of every instance go to TX SMLG and Goto/Load Distribution.

Please share a screenshot.

I suspect that for some reason the quality of your DI is too low.

Have both servers the same HW resources and the same number of WP's?

Cheers

Former Member
0 Kudos

Quality is determined also by response time, not only by available resources. Maybe your DI is slow to respond on the network, check with ping and ask your network admin to look into it. In the past I have seen many times incorrectly configured switch settings (always use Full Duplex, 1 Gbps or higher and never any Auto setting).

Former Member
0 Kudos

You cannot load balance 20 users among CI and one DI. That is just too few users. In case the database is on the same box as the CI, the CI will often have better response times.

Cheers Michael

akash_ahuja
Explorer
0 Kudos

Hi,

You have to configure group server on each user SAP GUI Screen for proper user of load balancing.

after you configure the same when user logon onto the system message server determine the server which have very less response time and redirect the user to the server dispatcher,Message server having this information by the job which runs every 5 secs internally on message server to determine the response time of all severs.

Regards:

Akash Ahuja

Former Member
0 Kudos

Thanks you all for your response.

At all the logon pad we have done the group configured.

Almost all the users are interactive.

I have attached the image of the SMLG - Load Distribution below

Kindly help.

Regards,

Harikrishna

Former Member
0 Kudos

Hi,

as per you screenshot, the quelaity of the first instance ins much better than the other one (321 vs 81) that's why the message server is selecting the first one. The queality is calculated based on several factors but on of them is the response time, that is much better in the first one as well.

You can influence in the Load balancing behavior of every group and instance going to the Properties tab of every instance but my suggestion is to review why the secand instance has this low quality.

Regards

Former Member
0 Kudos

Hi,

In order to check the Load Quality of every instance go to TX SMLG and Goto/Load Distribution.

Please share a screenshot.

Also check if the user connected to CI are Interactive or RFC users (TX AL08)

Regards

former_member185031
Active Contributor
0 Kudos

If your load balancing is not working in that case two possibility :

1. Users are logging directly to Central Instance

2. Load Balancing is not configured on GUI.

Regards,

Subhash

AtulKumarJain
Active Contributor
0 Kudos

Hi HariKrishana,

Please check SAP Note No. 593058 and below link

http://help.sap.com/saphelp_nw70/helpdata/en/64/32a5682e6a4e0cbb3f8a33970d11a8/content.htm

BR

Aj

Former Member
0 Kudos

The message server maintains a list of connected application servers including their services and a list of logon groups available. Additionally the message server maintains a list of quality, threshold and response time values for each connected application server. When a load balancing decision is made, several values are considered including existing load, quality and response time of all application servers. On top of that there is a load balancing algorithm in place that defaults to round robin. The load balancing can be configured by setting thresholds for each application server and by using a weighted round robin algorithm but for most customers the message server should do a pretty good job with the default values. However, attention should be given to proper logon group design. See the attached link for details.


http://help.sap.com/saphelp_nw73ehp1/helpdata/en/c4/3a64c1505211d189550000e829fbbd/frameset.htm

Former Member
0 Kudos

Thanks for the reply Samuli.

According to you message server will automatically determine the less loaded server and direct the user for that less loaded insatance even though the thresolds are not maintained in SMLG (as in my case).

But, when I see AL08, I see around 20 - 25 users in CI and only 2 - 5 users in Dialog instance.

Because of this, the CPU Idle for CI is always less than 50% and for Dailog it is above 90%.

Kindly help me in sorting this issue/confusion.

Regards,

Harikrishna

Former Member
0 Kudos

In addition make sure that all users have configured login parameters in SAP GUI to use message server and logon group. This balancing is for dialog logons only. You can configure load balancing for RFC calls also.

Configure Dynamic Logon Load Distribution for RFC Calls

Also account resource utilization for background jobs.