]
Bela Ban updated JGRP-1053:
---------------------------
Fix Version/s: 3.0
(was: 2.11)
Investigate in conjunction with dynamically changing credits in flow control
UNICAST: set retransmission timeout based on actual retransmission
times
------------------------------------------------------------------------
Key: JGRP-1053
URL:
https://jira.jboss.org/browse/JGRP-1053
Project: JGroups
Issue Type: Feature Request
Reporter: Bela Ban
Assignee: Bela Ban
Fix For: 3.0
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);
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: