Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Measuring constant sources of delay in downlink

10 views
Skip to first unread message

Hamid

unread,
Oct 24, 2024, 10:18:28 AM10/24/24
to 5G-LENA-users

Hi everyone,

I am analyzing the one-way delay in a downlink scenario (from an edge server to both single and multiple UE cases). I need help in measuring or identifying the constant sources of delay involved in the packet transmission, such as processing time at various network components, e.g., gNB and UE.

Could anyone recommend a way to accurately capture these delays (downlink)?

I would greatly appreciate any insights or suggestions.

Thank you!
Hamid

Kent Huns

unread,
Oct 24, 2024, 11:51:08 AM10/24/24
to 5G-LENA-users
You can capture it from flow-monitor with a little modification.
Some examples output "delaySum" at the end of simulation. I think "delayHistogram" and "time series table of delay" can be added in a similar way.

src/flow-monitor/model/flow-monitor.cc
void
FlowMonitor::ReportLastRx(Ptr<FlowProbe> probe,
                          uint32_t flowId,
                          uint32_t packetId,
                          uint32_t packetSize)
{
    Time now = Simulator::Now();
    Time delay = (now - tracked->second.firstSeenTime);
    stats.delaySum += delay;
    stats.delayHistogram.AddValue(delay.GetSeconds());
                         ↓
nr/example/cttc-nr-demo,cc
    for (std::map<FlowId, FlowMonitor::FlowStats>::const_iterator i = stats.begin();
         i != stats.end();
         ++i)
    {
        if (i->second.rxPackets > 0)
        {
            outFile << "  Mean delay:  "
                    << 1000 * i->second.delaySum.GetSeconds() / i->second.rxPackets << " ms\n";

And you can check HoLdelay in gNB-MAC.
nr/model/nr-gnb-mac.cc
void
NrGnbMac::DoReportBufferStatus(NrMacSapProvider::ReportBufferStatusParameters params)
{
    NS_LOG_FUNCTION(this);
    NrMacSchedSapProvider::SchedDlRlcBufferReqParameters schedParams;
    schedParams.m_logicalChannelIdentity = params.lcid;
    schedParams.m_rlcRetransmissionHolDelay = params.retxQueueHolDelay;
    schedParams.m_rlcRetransmissionQueueSize = params.retxQueueSize;
    schedParams.m_rlcStatusPduSize = params.statusPduSize;
    schedParams.m_rlcTransmissionQueueHolDelay = params.txQueueHolDelay;
    schedParams.m_rlcTransmissionQueueSize = params.txQueueSize;
    schedParams.m_rnti = params.rnti;

    NS_LOG_INFO("Reporting RLC buffer status update to MAC Scheduler for RNTI="
                << params.rnti << ", LCID=" << (uint32_t)params.lcid << ", Transmission Queue Size="
                << params.txQueueSize << ", Transmission Queue HOL Delay=" << params.txQueueHolDelay
                << ", Retransmission Queue Size=" << params.retxQueueSize
                << ", Retransmission Queue HOL delay=" << params.retxQueueHolDelay
                << ", PDU Size=" << params.statusPduSize);
Reply all
Reply to author
Forward
0 new messages