Skip to Content
author's profile photo Former Member
Former Member

Load Balancing in SAP

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

Add a comment
10|10000 characters needed characters exceeded

Related questions

10 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 11, 2014 at 10:58 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 17, 2013 at 02:13 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 11, 2013 at 05:18 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 12, 2013 at 04:41 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 12, 2013 at 09:53 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 12, 2013 at 12:40 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 13, 2013 at 05:49 AM

    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


    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      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

  • Posted on Sep 13, 2013 at 10:27 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 15, 2013 at 08:45 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      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).

  • author's profile photo Former Member
    Former Member
    Posted on Oct 15, 2013 at 12:45 PM

    ,

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.