update rttqcn detail and parameters

This commit is contained in:
cyp0633 2024-04-09 20:19:44 +08:00
parent e09953558b
commit b173cb9415
Signed by: cyp0633
GPG Key ID: CF90D09FB1FDCE45
4 changed files with 20 additions and 9 deletions

View File

@ -53,8 +53,9 @@ SWIFT_MIN_CWND 0.001
SWIFT_MAX_CWND 20000
SWIFT_TARGET_ENDPOINT_DELAY 1000000
RTT_QCN_T_MIN 5000
RTT_QCN_T_MAX 7000
// optimal: 10k 13k
RTT_QCN_T_MIN 10000
RTT_QCN_T_MAX 13000
RTT_QCN_ALPHA 0.5
RTT_QCN_BETA 0.25

View File

@ -2149,7 +2149,7 @@ RdmaHw::HandleAckRttQcn(Ptr<RdmaQueuePair> qp, Ptr<Packet> p, CustomHeader& ch)
}
// window in mtu (1000), not in bytes / seq#
auto cwnd = qp->m_win;
auto cwnd = qp->rttqcn.curr_win;
if (cwnd < m_mtu)
{
if (ecn)
@ -2169,13 +2169,14 @@ RdmaHw::HandleAckRttQcn(Ptr<RdmaQueuePair> qp, Ptr<Packet> p, CustomHeader& ch)
}
else
{
cwnd += m_mtu * 1.0 / cwnd;
// attempt to improve: multiply by 10
cwnd += m_mtu * 10.0 / cwnd;
}
}
std::cout << "[RTT-QCN] node: " << m_node->GetId() << ", cwnd: " << qp->m_win << "->" << cwnd
<< ", RTT: " << rtt << ", ecn: " << ecn << std::endl;
qp->m_win = cwnd;
std::cout << "[RTT-QCN] node: " << m_node->GetId() << ", cwnd: " << qp->rttqcn.curr_win << "->"
<< cwnd << ", RTT: " << rtt << ", ecn: " << ecn << std::endl;
qp->rttqcn.curr_win = cwnd;
qp->m_win = (uint32_t)cwnd;
}
} // namespace ns3

View File

@ -85,7 +85,9 @@ RdmaQueuePair::RdmaQueuePair(uint16_t pg,
swift.m_curRate = 0;
swift.m_retransmit_cnt = 0;
swift.m_pacing_delay = 0;
swift.m_real_win = 10000;
swift.m_real_win = 10000.0;
rttqcn.curr_win = 50000.0;
}
void

View File

@ -147,6 +147,13 @@ class RdmaQueuePair : public Object
double m_real_win;
} swift;
struct
{
// There's no packet pacing in rtt-qcn; however m_win is uint32_t, which makes additive increase really
// slow. Using a double to store real window helps a lot.
double curr_win;
} rttqcn;
/***********
* methods
**********/