Bug 2837 - More than needed RBGs assignment of CQA scheduler
More than needed RBGs assignment of CQA scheduler
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: lte
ns-3-dev
All All
: P3 normal
Assigned To: Zoraze Ali
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-12-11 11:09 UTC by Zoraze Ali
Modified: 2017-12-12 13:25 UTC (History)
2 users (show)

See Also:


Attachments
test script (8.84 KB, text/x-c++src)
2017-12-11 11:09 UTC, Zoraze Ali
Details
patch (844 bytes, patch)
2017-12-11 11:19 UTC, Zoraze Ali
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Zoraze Ali 2017-12-11 11:09:37 UTC
Created attachment 2976 [details]
test script

Hi, 

In a downlink scenario CqaFfMacScheduler scheduler is assigning all the RBGs to a single user even though there is little data to be transmitted to it. In the end there is only one UE scheduled during one TTI.

In the attached test script I am generating 200 byte packet, so in total,

200 (payload) + 2 (RLC header) + 2 (PDCP header) + 20 (IP header) + 8 (UDP header) = 232 bytes or 1856 bits.

If the MCS is 28, the maximum TB size for 24 PRBs is 2196 bytes but to TX 232 bytes a TB of size 373 bytes would be enough. With this bug in MAC stats we can see that every UE has been assigned a maximum TB size, e.g.,

% time    cellId    IMSI    frame    sframe    RNTI    mcsTb1    sizeTb1   
 0.3        1        2        31       1       1        28        2196            
0.301       1        3        31       2       2        28        2196            
0.302       1        1        31       3       3        28        2196

The reason for this behaviour is incorrect comparison of needed resources and assigned resources at line 1488

if (UeToAmountOfDataToTransfer.find (userWithMaximumMetric)->second <= UeToAmountOfAssignedResources.find (userWithMaximumMetric)->second*tolerance)
//||(UeHasReachedGBR.find(userWithMaximumMetric)->second == true))
  {
    itCurrentGroup->second.erase (userWithMaximumMetric);
  }

Here UeToAmountOfDataToTransfer is in "bits" while "UeToAmountOfAssignedResources" is in bytes. Due to this reason a selected UE who already has been assigned sufficient amount of RBGs never get erased and the while loop "while (availableRBGs.size ()>0 and itCurrentGroup->second.size ()>0)" at line 1310, kept running till all the RBGs are assigned to a single UE.  

Kind regards,
Zoraze
Comment 1 Zoraze Ali 2017-12-11 11:19:43 UTC
Created attachment 2977 [details]
patch

Hi, 

Please find the minimum patch to cure the problem. After applying the patch MAC stats will be as follows. 

% time    cellId    IMSI    frame    sframe    RNTI    mcsTb1    sizeTb1   
 0.3        1        2        31       1       1        28        373            
 0.3        1        3        31       2       2        28        373            
 0.3        1        1        31       3       3        28        373


Kind regards,
Zoraze
Comment 2 Biljana Bojović 2017-12-12 13:25:12 UTC
Pushed to changeset 13203:456bc8ea5b01