boglesby commented on pull request #7378:
URL: https://github.com/apache/geode/pull/7378#issuecomment-1071176231


   I ran a few tests with some extra logging on these changes. They look good.
   
   #### The receiver exchanges profiles with the locator:
   ```
   [warn 2022/03/16 14:16:12.440 PDT locator-ln <Pooled High Priority Message 
Processor 2> tid=0x50] XXX LocatorLoadSnapshot.updateConnectionLoadMap 
location=192.168.1.5:5370; load=0.0
   
   [warn 2022/03/16 14:16:12.441 PDT locator-ln <Pooled High Priority Message 
Processor 2> tid=0x50] XXX LocatorLoadSnapshot.updateConnectionLoadMap current 
load for location=192.168.1.5:5370; group=__recv__group; inputLoad=0.0; 
currentLoad=0.0
   
   [warn 2022/03/16 14:16:12.441 PDT locator-ln <Pooled High Priority Message 
Processor 2> tid=0x50] XXX LocatorLoadSnapshot.updateConnectionLoadMap updated 
load for location=192.168.1.5:5370; group=__recv__group; inputLoad=0.0; 
newLoad=0.0
   ```
   The connectionLoadMap shows 2 groups, namely the null group (default) and 
the __recv__group group (gateway receiver), each with load=0.0:
   ```
   [warn 2022/03/16 14:16:13.777 PDT locator-ln <Thread-14> tid=0x43] XXX 
LocatorLoadSnapshot.logConnectionLoadMap
   The connectionLoadMap contains the following 2 entries:
        group=null
                location=192.168.1.5:56224; load=0.0
        group=__recv__group
                location=192.168.1.5:5370; load=0.0
   ```
   #### Sender connects to the receiver:
   
   With the default of 5 dispatcher threads, 5 connections are made to the 
receiver. The load goes from 0.0 to 0.0062499996:
   ```
   [warn 2022/03/16 14:16:53.836 PDT locator-ln <locator request thread 2> 
tid=0x47] XXX LocatorLoadSnapshot.getServerForConnection group=__recv__group; 
server=192.168.1.5:5370; loadBeforeUpdate=0.0
   
   [warn 2022/03/16 14:16:53.836 PDT locator-ln <locator request thread 2> 
tid=0x47] XXX LocatorLoadSnapshot.getServerForConnection group=__recv__group; 
server=192.168.1.5:5370; loadAfterUpdate=0.00125
   
   
   [warn 2022/03/16 14:16:53.836 PDT locator-ln <locator request thread 6> 
tid=0x5c] XXX LocatorLoadSnapshot.getServerForConnection group=__recv__group; 
server=192.168.1.5:5370; loadBeforeUpdate=0.00125
   
   [warn 2022/03/16 14:16:53.836 PDT locator-ln <locator request thread 6> 
tid=0x5c] XXX LocatorLoadSnapshot.getServerForConnection group=__recv__group; 
server=192.168.1.5:5370; loadAfterUpdate=0.0025
   
   
   [warn 2022/03/16 14:16:53.837 PDT locator-ln <locator request thread 5> 
tid=0x5b] XXX LocatorLoadSnapshot.getServerForConnection group=__recv__group; 
server=192.168.1.5:5370; loadBeforeUpdate=0.0025
   
   [warn 2022/03/16 14:16:53.837 PDT locator-ln <locator request thread 5> 
tid=0x5b] XXX LocatorLoadSnapshot.getServerForConnection group=__recv__group; 
server=192.168.1.5:5370; loadAfterUpdate=0.00375
   
   
   [warn 2022/03/16 14:16:53.837 PDT locator-ln <locator request thread 4> 
tid=0x5a] XXX LocatorLoadSnapshot.getServerForConnection group=__recv__group; 
server=192.168.1.5:5370; loadBeforeUpdate=0.00375
   
   [warn 2022/03/16 14:16:53.837 PDT locator-ln <locator request thread 4> 
tid=0x5a] XXX LocatorLoadSnapshot.getServerForConnection group=__recv__group; 
server=192.168.1.5:5370; loadAfterUpdate=0.005
   
   
   [warn 2022/03/16 14:16:53.838 PDT locator-ln <locator request thread 3> 
tid=0x59] XXX LocatorLoadSnapshot.getServerForConnection group=__recv__group; 
server=192.168.1.5:5370; loadBeforeUpdate=0.005
   
   [warn 2022/03/16 14:16:53.838 PDT locator-ln <locator request thread 3> 
tid=0x59] XXX LocatorLoadSnapshot.getServerForConnection group=__recv__group; 
server=192.168.1.5:5370; loadAfterUpdate=0.0062499996
   ```
   The connectionLoadMap shows the same 2 groups but now the __recv__group 
group load is 0.0062499996 for the gateway receiver:
   ```
   [warn 2022/03/16 14:16:55.831 PDT locator-ln <Thread-14> tid=0x43] XXX 
LocatorLoadSnapshot.logConnectionLoadMap
   The connectionLoadMap contains the following 2 entries:
        group=null
                location=192.168.1.5:56224; load=0.0
        group=__recv__group
                location=192.168.1.5:5370; load=0.0062499996
   ```
   #### Update the load:
   
   Periodically, the server sends an updated load to the locator.
   ```
   [warn 2022/03/16 14:16:57.464 PDT locator-ln <P2P message reader for 
192.168.1.5(ln-1:75228)<v1>:41002 unshared ordered sender uid=5 dom #1 local 
port=45635 remote port=56270> tid=0x5e] XXX 
LocatorLoadSnapshot.updateConnectionLoadMap current load for 
location=192.168.1.5:5370; group=__recv__group; inputLoad=0.00625; 
currentLoad=0.0062499996
   
   [warn 2022/03/16 14:16:57.464 PDT locator-ln <P2P message reader for 
192.168.1.5(ln-1:75228)<v1>:41002 unshared ordered sender uid=5 dom #1 local 
port=45635 remote port=56270> tid=0x5e] XXX 
LocatorLoadSnapshot.updateConnectionLoadMap updated load for 
location=192.168.1.5:5370; group=__recv__group; inputLoad=0.00625; 
newLoad=0.00625
   
   [warn 2022/03/16 14:16:57.832 PDT locator-ln <Thread-14> tid=0x43] XXX 
LocatorLoadSnapshot.logConnectionLoadMap
   The connectionLoadMap contains the following 2 entries:
        group=null
                location=192.168.1.5:56224; load=0.0
        group=__recv__group
                location=192.168.1.5:5370; load=0.00625
   ```
   #### Update the load after ping connection has been made:
   
   After another connection is made, the load is updated again.
   ```
   [warn 2022/03/16 14:17:02.466 PDT locator-ln <P2P message reader for 
192.168.1.5(ln-1:75228)<v1>:41002 unshared ordered sender uid=5 dom #1 local 
port=45635 remote port=56270> tid=0x5e] XXX 
LocatorLoadSnapshot.updateConnectionLoadMap current load for 
location=192.168.1.5:5370; group=__recv__group; inputLoad=0.0075; 
currentLoad=0.00625
   
   [warn 2022/03/16 14:17:02.466 PDT locator-ln <P2P message reader for 
192.168.1.5(ln-1:75228)<v1>:41002 unshared ordered sender uid=5 dom #1 local 
port=45635 remote port=56270> tid=0x5e] XXX 
LocatorLoadSnapshot.updateConnectionLoadMap updated load for 
location=192.168.1.5:5370; group=__recv__group; inputLoad=0.0075; newLoad=0.0075
   
   [warn 2022/03/16 14:17:03.841 PDT locator-ln <Thread-14> tid=0x43] XXX 
LocatorLoadSnapshot.logConnectionLoadMap
   The connectionLoadMap contains the following 2 entries:
        group=null
                location=192.168.1.5:56224; load=0.0
        group=__recv__group
                location=192.168.1.5:5370; load=0.0075
   ```
   #### Connect another sender:
   
   Another sender with 5 dispatcher threads connects, and the load is updated 
again.
   ```
   [warn 2022/03/16 14:29:44.794 PDT locator-ln <Thread-14> tid=0x43] XXX 
LocatorLoadSnapshot.logConnectionLoadMap
   The connectionLoadMap contains the following 2 entries:
        group=null
                location=192.168.1.5:56600; load=0.0
        group=__recv__group
                location=192.168.1.5:5190; load=0.015
   ```
   #### Disconnect one sender:
   
   When a sender disconnects, the load is updated again.
   ```
   [warn 2022/03/16 14:30:38.843 PDT locator-ln <Thread-14> tid=0x43] XXX 
LocatorLoadSnapshot.logConnectionLoadMap
   The connectionLoadMap contains the following 2 entries:
        group=null
                location=192.168.1.5:56600; load=0.0
        group=__recv__group
                location=192.168.1.5:5190; load=0.0075
   ```
   #### Start another receiver:
   
   When another receiver is started, an entry for it is added to the 
connectionLoadMap with load=0.0.
   ```
   [warn 2022/03/16 14:35:07.535 PDT locator-ln <Thread-14> tid=0x43] XXX 
LocatorLoadSnapshot.logConnectionLoadMap
   The connectionLoadMap contains the following 2 entries:
        group=null
                location=192.168.1.5:56940; load=0.0
                location=192.168.1.5:56833; load=0.0
        group=__recv__group
                location=192.168.1.5:5055; load=0.015
                location=192.168.1.5:5256; load=0.0
   ```
   #### Two receivers and two senders:
   
   When two receivers are started and two senders are connected, the load is 
updated (and balanced). In this case, the extra connections are pingers - one 
from each sender to each receiver.
   ```
   [warn 2022/03/16 14:44:32.269 PDT locator-ln <Thread-14> tid=0x43] XXX 
LocatorLoadSnapshot.logConnectionLoadMap
   The connectionLoadMap contains the following 2 entries:
        group=null
                location=192.168.1.5:57530; load=0.0
                location=192.168.1.5:57553; load=0.0
        group=__recv__group
                location=192.168.1.5:5349; load=0.00875
                location=192.168.1.5:5025; load=0.00875
   ```
   #### Load balance senders:
   
   This feature does not seem to be working properly. These changes seem to 
make it work better. I have another bunch of analysis on this that I will 
either post separately or file a JIRA on.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@geode.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to