public class CubicCongestionControl extends java.lang.Object implements CongestionControl
https://research.csc.ncsu.edu/netsrv/?q=content/bic-and-cubic
W_cubic = C(T - K)^3 + w_max
K = cbrt(w_max * B / C)
w_max
= window size before reduction
T
= time since last decrease
C
= scaling constant (default 0.4)
B
= multiplicative decrease (default 0.2)
at MTU=4K, max window=128KB (w_max = 32 MTUs), then K ~= 2.5 seconds.
Modifier and Type | Method and Description |
---|---|
void |
close() |
int |
initialWindowLength()
Called by
DriverConductor to initialise window length for a new PublicationImage . |
void |
onRttMeasurement(long nowNs,
long rttNs,
java.net.InetSocketAddress srcAddress)
Called by
Receiver on reception of an RTT Measurement. |
void |
onRttMeasurementSent(long nowNs)
Called by
Receiver to record that a measurement request has been sent. |
long |
onTrackRebuild(long nowNs,
long newConsumptionPosition,
long lastSmPosition,
long hwmPosition,
long startingRebuildPosition,
long endingRebuildPosition,
boolean lossOccurred)
Called by
DriverConductor upon execution of PublicationImage.trackRebuild(long, long) to
pass on current status. |
boolean |
shouldMeasureRtt(long nowNs)
Polled by
Receiver to determine when to initiate an RTT measurement to a Sender. |
public boolean shouldMeasureRtt(long nowNs)
CongestionControl
Receiver
to determine when to initiate an RTT measurement to a Sender.shouldMeasureRtt
in interface CongestionControl
nowNs
- in nanosecondspublic void onRttMeasurementSent(long nowNs)
CongestionControl
Receiver
to record that a measurement request has been sent.onRttMeasurementSent
in interface CongestionControl
nowNs
- in nanoseconds.public void onRttMeasurement(long nowNs, long rttNs, java.net.InetSocketAddress srcAddress)
CongestionControl
Receiver
on reception of an RTT Measurement.onRttMeasurement
in interface CongestionControl
nowNs
- in nanosecondsrttNs
- to the Sender in nanosecondssrcAddress
- of the Senderpublic long onTrackRebuild(long nowNs, long newConsumptionPosition, long lastSmPosition, long hwmPosition, long startingRebuildPosition, long endingRebuildPosition, boolean lossOccurred)
CongestionControl
DriverConductor
upon execution of PublicationImage.trackRebuild(long, long)
to
pass on current status.
The return value must be packed using CongestionControlUtil.packOutcome(int, boolean)
.
onTrackRebuild
in interface CongestionControl
nowNs
- in nanosecondsnewConsumptionPosition
- of the SubscriberslastSmPosition
- of the imagehwmPosition
- of the imagestartingRebuildPosition
- of the rebuildendingRebuildPosition
- of the rebuildlossOccurred
- during rebuildpublic int initialWindowLength()
CongestionControl
DriverConductor
to initialise window length for a new PublicationImage
.initialWindowLength
in interface CongestionControl
public void close()
close
in interface CongestionControl
close
in interface java.lang.AutoCloseable
Copyright © 2014-2018 Real Logic Ltd. All Rights Reserved.