Unipisa / Unipisa/Simu5G

Statistics 'macCellThroughput(D2D|Ul|Dl)' use static member for total byte count producing overflow and wrong data in multi basestation scenarios

Open
#187 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
235
Forks
116
PR merge metrics
No merged PRs in 30d

Description

The statistics are defined in LteMac.ned

        @signal[macCellThroughputUl];
        @statistic[macCellThroughputUl](title="Cell Throughput at the MAC layer UL"; unit="Bps"; source="macCellThroughputUl"; record=mean);
        @signal[macCellThroughputDl];
        @statistic[macCellThroughputDl](title="Cell Throughput at the MAC layer DL"; unit="Bps"; source="macCellThroughputDl"; record=mean);
        @signal[macCellThroughputD2D];
        @statistic[macCellThroughputD2D](title="Cell Throughput at the MAC layer D2D"; unit="Bps"; source="macCellThroughputD2D"; record=mean); 

The recording of the statistics takes place the extractCorrectPdus method of the respective HarqBuffer ( normal or
d2d enabled case). The cell throughput is calculated by dividing the total amount of bytes received by the total amount of elapsed time.

The problem is that totalCellRcvdBytes_ is a static unsigned int. See LteHarqBufferRx .

  • This means if multiple eNB's/gNB's are simulated, they will add up their received total.
  • The variable can only hold 2^32 which is easily read when all eNB's/gNB's write to the same variable.

Possible fix.

Use INET ThroughputFilter result filter implementation.
See for instance the ActivePacketSourceBase module of the INET queuing API. Here the throughput is calculated
by the ThroughputFilter using statistics and result filter tools provided by OMNeT. It also allows to configure the
interval length using ini files on a simulation by simulation basis.

@statistic[dataRate](title="data rate"; source=throughput(packetPushed); record=vector; unit=bps; interpolationmode=linear);

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with LteHarqBufferRx.h and the extractCorrectPdus methods in LteHarqBufferRx.cc and LteHarqBufferRxD2D.cc, then compare the referenced INET ThroughputFilter and ActivePacketSourceBase implementations. Confirm how the current static byte counter affects multiple base stations and overflow; done means throughput is correctly separated and measured without the shared 32-bit limitation.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.