public class CubicCongestionControl extends Object implements CongestionControl
https://tools.ietf.org/id/draft-rhee-tcpm-cubic-02.txt and https://dl.acm.org/doi/10.1145/1400097.1400105
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 | Field and Description |
|---|---|
static String |
CC_PARAM_VALUE
URI param value to identify this
CongestionControl strategy. |
FORCE_STATUS_MESSAGE_BIT| Constructor and Description |
|---|
CubicCongestionControl(long registrationId,
UdpChannel udpChannel,
int streamId,
int sessionId,
int termLength,
int senderMtuLength,
InetSocketAddress controlAddress,
InetSocketAddress sourceAddress,
NanoClock nanoClock,
MediaDriver.Context context,
CountersManager countersManager)
Construct a new
CongestionControl instance for a received stream image using the Cubic algorithm. |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
int |
initialWindowLength()
Called by
DriverConductor to initialise window length for a new PublicationImage. |
int |
maxWindowLength()
Called by
DriverConductor limit the window length for a new PublicationImage. |
void |
onRttMeasurement(long nowNs,
long rttNs,
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) to
pass on current status. |
boolean |
shouldMeasureRtt(long nowNs)
Polled by
Receiver to determine when to initiate an RTT measurement to a Sender. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpackOutcome, receiverWindowLength, shouldForceStatusMessage, thresholdpublic static final String CC_PARAM_VALUE
CongestionControl strategy.public CubicCongestionControl(long registrationId,
UdpChannel udpChannel,
int streamId,
int sessionId,
int termLength,
int senderMtuLength,
InetSocketAddress controlAddress,
InetSocketAddress sourceAddress,
NanoClock nanoClock,
MediaDriver.Context context,
CountersManager countersManager)
CongestionControl instance for a received stream image using the Cubic algorithm.registrationId - for the publication image.udpChannel - for the publication image.streamId - for the publication image.sessionId - for the publication image.termLength - for the publication image.senderMtuLength - for the publication image.controlAddress - for the publication image.sourceAddress - for the publication image.nanoClock - for the precise timing.context - for configuration options applied in the driver.countersManager - for the driver.public void close()
close in interface CongestionControlclose in interface AutoCloseablepublic boolean shouldMeasureRtt(long nowNs)
Receiver to determine when to initiate an RTT measurement to a Sender.shouldMeasureRtt in interface CongestionControlnowNs - in nanosecondspublic void onRttMeasurementSent(long nowNs)
Receiver to record that a measurement request has been sent.onRttMeasurementSent in interface CongestionControlnowNs - in nanoseconds.public void onRttMeasurement(long nowNs,
long rttNs,
InetSocketAddress srcAddress)
Receiver on reception of an RTT Measurement.onRttMeasurement in interface CongestionControlnowNs - 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)
DriverConductor upon execution of PublicationImage.trackRebuild(long) to
pass on current status.
The return value must be packed using CongestionControl.packOutcome(int, boolean).
onTrackRebuild in interface CongestionControlnowNs - current timenewConsumptionPosition - of the subscriberslastSmPosition - of the imagehwmPosition - of the imagestartingRebuildPosition - of the rebuildendingRebuildPosition - of the rebuildlossOccurred - during rebuildpublic int initialWindowLength()
DriverConductor to initialise window length for a new PublicationImage.initialWindowLength in interface CongestionControlpublic int maxWindowLength()
DriverConductor limit the window length for a new PublicationImage.maxWindowLength in interface CongestionControlCopyright © 2014-2023 Real Logic Limited. All Rights Reserved.