Uploaded image for project: 'JGroups'
  1. JGroups
  2. JGRP-1053

UNICAST: set retransmission timeout based on actual retransmission times

    XMLWordPrintable

Details

    • Feature Request
    • Resolution: Unresolved
    • Major
    • Future
    • None
    • None
    • 0
    • 0% 0%

    Description

      UNICAST needs to compute a rolling average of retransmission times, per sender (AckSenderWindow).

      The retransmission timeout per sender can then be set based on the actual average retransmission times. The advantage is that we throttle retransmission when we have a lot of message loss, and speed it up again when there are no message drops.

      The function to set the timeout should always compute the new timeot value based on (1) the old value times a decay factor and (2) a new value.

      The average should go up relatively quickly if the actual retransmission values go up, but come down slowly when the actual values go down.

      A potential function is shown below:

      static final double SLOW_DECAY_FACTOR=0.9, FAST_DECAY_FACTOR=0.7;
      static final double FAST_UP= 1 / FAST_DECAY_FACTOR, SLOW_UP= 1 / SLOW_DECAY_FACTOR;
      static final double SAFETY_BUFFER=0.3;

      static double avg=200;

      public static void main(String[] args) {

      final long[] times=

      {200,200,400,400,500,500,500,500,500,100,100,100,100,100,100,100,100,100,100,100,100,100}

      ;

      // final long[] times=

      {200,200,200,200,200,200,200,200,200,200,200}

      ;

      for(Long val: times)

      { double result=avg(val); System.out.println(val + ": " + result); }

      }

      private static double avg(long val) {
      double decay, up;

      if(val > avg)

      { decay=FAST_DECAY_FACTOR; up=FAST_UP; }

      else

      { decay=SLOW_DECAY_FACTOR; up=SLOW_UP; }

      double old_val=avg * decay;
      double result=(old_val + val * up) / 2;
      avg=result;
      return result * (1 + SAFETY_BUFFER);

      }

      Attachments

        Issue Links

          Activity

            People

              rhn-engineering-bban Bela Ban
              rhn-engineering-bban Bela Ban
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: