fix to limit rate increase to no more than double during slow start
parent
0c6e516c90
commit
bc6e81feda
2
protolib
2
protolib
|
|
@ -1 +1 @@
|
|||
Subproject commit a28606945f6b507760548b242b6706b51b5b69d3
|
||||
Subproject commit dc92c6b8ccc75a01ecd2d7850f6bc7d8a7fe671d
|
||||
|
|
@ -2824,12 +2824,15 @@ void NormSenderNode::UpdateRecvRate(const struct timeval& currentTime, unsigned
|
|||
{
|
||||
// Approximate initial recv_rate when initial packets arrive in a burst
|
||||
recv_rate = recv_accumulator.GetValue() / NORM_TICK_MIN;
|
||||
TRACE("BURST INIT: accum:%lf tick:%lf rate:%lf kbps\n", recv_accumulator.GetValue(), NORM_TICK_MIN, recv_rate*8.0e-03);
|
||||
recv_rate_prev = 0.0;
|
||||
}
|
||||
nominal_packet_size += 0.05 * (((double)msgSize) - nominal_packet_size);
|
||||
TRACE("UPDATED RECV rate: %lf kbps nsize: %lf\n", 8.0e-3*recv_rate, nominal_packet_size);
|
||||
}
|
||||
else
|
||||
{
|
||||
TRACE("RATE INIT ZERO\n");
|
||||
recv_rate = recv_rate_prev = 0.0;
|
||||
prev_update_time = currentTime;
|
||||
recv_accumulator.Reset();
|
||||
|
|
|
|||
|
|
@ -2782,7 +2782,8 @@ void NormTrace(const struct timeval ¤tTime,
|
|||
// Print ccRtt (only valid if pcap file is from sender node)
|
||||
double ccRtt = NormUnquantizeRtt(((NormCCFeedbackExtension &)ext).GetCCRtt());
|
||||
double ccLoss = NormUnquantizeLoss32(((NormCCFeedbackExtension &)ext).GetCCLoss32());
|
||||
PLOG(PL_ALWAYS, "ccRtt:%lf ccLoss:%lf ", ccRtt, ccLoss);
|
||||
double ccRate = 8.0e-03 * NormUnquantizeRate(((NormCCFeedbackExtension &)ext).GetCCRate());
|
||||
PLOG(PL_ALWAYS, "ccRtt:%lf ccLoss:%lf ccRate:%lf kbps ", ccRtt, ccLoss, ccRate);
|
||||
// Print locally measured rtt (only valid if pcap file is from sender node)
|
||||
struct timeval grttResponse;
|
||||
if (NormMsg::NACK == msgType)
|
||||
|
|
@ -5540,6 +5541,9 @@ void NormSession::AdjustRate(bool onResponse)
|
|||
if (cc_slow_start)
|
||||
{
|
||||
txRate = clr->GetRate();
|
||||
// Don't adjust rate more than double per RTT during slow start
|
||||
double rateDouble = 2.0*tx_rate;
|
||||
if (txRate > rateDouble) txRate = rateDouble;
|
||||
if (GetDebugLevel() >= 6)
|
||||
{
|
||||
double sentRate = 8.0e-03 * sent_accumulator.GetScaledValue(1.0 / (report_timer.GetInterval() - report_timer.GetTimeRemaining()));
|
||||
|
|
@ -5647,10 +5651,14 @@ void NormSession::AdjustRate(bool onResponse)
|
|||
}
|
||||
}
|
||||
}
|
||||
// Limit rate to tx_rate_max if that has been set
|
||||
if ((tx_rate_max >= 0.0) && (txRate > tx_rate_max))
|
||||
txRate = tx_rate_max;
|
||||
if (txRate != tx_rate)
|
||||
{
|
||||
// TBD - don't adjust rate more than double per RTT all the time???
|
||||
//double rateDouble = 2.0*tx_rate;
|
||||
//if (txRate > rateDouble) txRate = rateDouble;
|
||||
if (cc_adjust)
|
||||
SetTxRateInternal(txRate);
|
||||
if (!posted_tx_rate_changed)
|
||||
|
|
|
|||
|
|
@ -86,7 +86,19 @@ int main(int argc, char *argv[])
|
|||
ProtoPktETH::Type ethType;
|
||||
unsigned int payloadLength;
|
||||
UINT32 *payloadPtr;
|
||||
if (DLT_NULL == deviceType)
|
||||
if (DLT_LINUX_SLL == deviceType)
|
||||
{
|
||||
// For now, assume the header is 16 bytes (6-byte link addr)
|
||||
// TBD - do proper DLT_LINUX_SLL parsing
|
||||
memcpy(alignedBuffer, pktData, numBytes);
|
||||
//ethType = (ProtoPktETH::Type)ntohs(((UINT16*)alignedBuffer)[7]);
|
||||
payloadPtr = alignedBuffer + 4; // assumes 16 byte header
|
||||
//ipBufferBytes = maxBytes + 2 - 16;
|
||||
payloadLength = numBytes - 16;
|
||||
ethType = ProtoPktETH::IP;
|
||||
|
||||
}
|
||||
else if (DLT_NULL == deviceType)
|
||||
{
|
||||
// pcap was captured from "loopback" device
|
||||
memcpy(alignedBuffer, pktData, numBytes);
|
||||
|
|
|
|||
Loading…
Reference in New Issue