srsran / oran-sc-ric

Simplified ORAN SC RIC with improved usability and xApp examples
GNU Affero General Public License v3.0
39 stars 7 forks source link

The "simple_xapp.py" has no effect on the dl_throughput of the UE #43

Closed CCCodelover closed 3 weeks ago

CCCodelover commented 1 month ago

I'm experiencing the same problem as #21, is updating the srsRAN_Project version to srsRAN_Project-release_24_10 the only solution now? I would also like to ask if the ‘simple_xapp.py’ starts up and collects:

UE ID: 0, Max PRB Ratio: 100, Total TXed Data [MB]: 21.6
    21.6 MB of data transmitted to UE --> Switch Max PRB limit
    --->Send RIC Control Request to E2 node ID: gnbd_001_001_00019b_0 for UE ID: 0, PRB_min: 1, PRB_max: 10

What does Total TXed Data mean?

pgawlowicz commented 1 month ago

please check the xapp here: https://github.com/srsran/oran-sc-ric/blob/main/xApps/python/simple_xapp.py

CCCodelover commented 1 month ago

https://github.com/srsran/oran-sc-ric/blob/main/xApps/python/simple_xapp.pyThis is the simple_xapp.py I have enabled, the problem is that the gnb terminal doesn't change anything、

CCCodelover commented 1 month ago

The output of GNB looks like this:

              |  15   1   28    29M  994    0   0%  1.08M |  65.5   ovl   27   199k  104    0   0%      0   0us  n/a
   1 4601 |  15   1   28    29M  993    0   0%  2.02M |  65.5   ovl   27   198k  107    0   0%     10   0us  n/a
   1 4601 |  15   1   28    29M  994    0   0%  3.22M |  65.5   ovl   27   195k  104    0   0%      0   0us  n/a
   1 4601 |  15   1   28    29M  994    0   0%  5.41M |  65.5   ovl   27   248k  101    0   0%      0   0us  n/a
   1 4601 |  15   1   28    29M  994    0   0%  6.12M |  65.5   ovl   27   216k  104    0   0%     10   0us  n/a
   1 4601 |  15   1   28    29M  993    0   0%  6.12M |  65.5   ovl   27   212k   99    0   0%      0   0us  n/a
   1 4601 |  15   1   28    29M  994    0   0%  6.13M |  65.5   ovl   27   227k  108    0   0%     10   0us  n/a
   1 4601 |  15   1   28    29M  994    0   0%  6.12M |  65.5   ovl   27   221k  103    0   0%     10   0us  n/a
   1 4601 |  15   1   28    29M  994    0   0%  6.12M |  65.5   ovl   27   199k  106    0   0%     10   0us  n/a

Why doesn't 29M change

pgawlowicz commented 1 month ago

could you share your gnb logs?

CCCodelover commented 1 month ago

gnb.log Please take a look for me.

pgawlowicz commented 1 month ago

you need to connect a UE, and start traffic, so that you can limit it with the xapp

CCCodelover commented 1 month ago

gnb should look similar to the one below:

 pci rnti | cqi  ri  mcs  brate   ok  nok  (%)  dl_bs | pusch  rsrp  mcs  brate   ok  nok  (%)    bsr     ta  phr
   1 4601 |  15 1.0   28   6.8M  994    0   0%  6.15M |  65.5   ovl   27   233k   98    0   0%      0      0  n/a
   1 4601 |  15 1.0   28   6.8M  993    0   0%  6.15M |  65.5   ovl   27   246k  100    0   0%      0      0  n/a
   1 4601 |  15 1.0   28   6.8M  994    0   0%  6.15M |  65.5   ovl   27   231k  105    0   0%     10      0  n/a
   1 4601 |  15 1.0   28   6.8M  994    0   0%  6.15M |  65.5   ovl   27   245k   99    0   0%      0      0  n/a
   1 4601 |  15 1.0   28   6.8M  994    0   0%  6.15M |  65.5   ovl   27   231k  100    0   0%      0      0  n/a
   1 4601 |  15 1.0   28   6.8M  993    0   0%  6.15M |  65.5   ovl   27   227k  100    0   0%      0      0  n/a
   1 4601 |  15 1.0   28   6.8M  994    0   0%  6.15M |  65.5   ovl   27   238k   99    0   0%      0      0  n/a
   1 4601 |  15 1.0   28    22M  994    0   0%  6.12M |  65.5   ovl   27   235k  100    0   0%     10      0  n/a
   1 4601 |  15 1.0   28    29M  994    0   0%  6.12M |  65.5   ovl   27   229k   98    0   0%      0      0  n/a
   1 4601 |  15 1.0   28    29M  993    0   0%  6.12M |  65.5   ovl   27   230k   98    0   0%      0      0  n/a
   1 4601 |  15 1.0   28    29M  994    0   0%  6.12M |  65.4   ovl   27   227k  100    0   0%      0      0  n/a

But my gnb was:

1 4601 |  15 1.0   28    29M  994    0   0%  2.27M |  65.5   ovl   27   238k   95    0   0%      0      0  n/a
   1 4601 |  15 1.0   28    29M  994    0   0%  2.99M |  65.5   ovl   27   248k   99    0   0%      0      0  n/a
   1 4601 |  15 1.0   28    29M  994    0   0%  3.72M |  65.4   ovl   28   253k  100    0   0%      0      0  n/a
   1 4601 |  15 1.0   28    29M  993    0   0%   4.5M |  65.5   ovl   28   253k  100    0   0%      0      0  n/a
   1 4601 |  15 1.0   28    29M  994    0   0%  5.21M |  65.5   ovl   28   253k  100    0   0%      0      0  n/a
   1 4601 |  15 1.0   28    29M  994    0   0%  5.97M |  65.5   ovl   27   248k   99    0   0%      0      0  n/a
   1 4601 |  15 1.0   28    29M  994    0   0%  6.13M |  65.5   ovl   28   253k  100    0   0%      0      0  n/a
   1 4601 |  15 1.0   28    29M  993    0   0%  6.13M |  65.5   ovl   28   253k  100    0   0%      0      0  n/a
   1 4601 |  15 1.0   28    29M  994    0   0%  6.12M |  65.5   ovl   28   253k  100    0   0%      0      0  n/a
   1 4601 |  15 1.0   28    29M  994    0   0%  6.13M |  65.5   ovl   27   239k   96    0   0%      0      0  n/a
   1 4601 |  15 1.0   28    29M  994    0   0%  6.13M |  65.5   ovl   28   253k  100    0   0%      0      0  n/a

Here's my gnb log. gnb.zip

CCCodelover commented 1 month ago

Dear Sir, Thanks for your swift reply. The brate value stuck up with 29 M even when the xApp is running. I've tried a lot of things to fix it, and everything looks fine with the other components. Best Regards @pgawlowicz

pgawlowicz commented 1 month ago

Please pull the newest code, and start the following xapp:

docker compose exec python_xapp_runner ./simple_rc_xapp.py

Start UDP iperf in DL, you should see the following gnb console trace:

---------Signal-----------|-----------------DL-----------------|-----------UL-----------
rat  pci  rsrp   pl   cfo | mcs  snr  iter  brate  bler  ta_us | mcs   buff  brate  bler
 nr    1     7    0 -4.8u |  27   69   1.1    29M    0%    0.0 |  27    3.0   256k    0%
 nr    1     7    0  4.4u |  27   69   1.1    29M    0%    0.0 |  27    0.0   241k    0%
 nr    1     7    0 -1.4u |  27   69   1.5    16M    0%    0.0 |  27    3.0   252k    0%
 nr    1     7    0 -2.7u |  27   69   1.8   3.3M    0%    0.0 |  27    3.0   227k    0%
 nr    1     7    0 -1.2u |  27   69   1.8   3.3M    0%    0.0 |  27    0.0   233k    0%
 nr    1     7    0 -3.8u |  27   69   1.8   3.3M    0%    0.0 |  27    3.0   230k    0%
 nr    1     7    0 -3.5u |  27   66   1.8   3.3M    0%    0.0 |  27    0.0   232k    0%
 nr    1     7    0 -2.6u |  27   69   1.4    16M    0%    0.0 |  27    0.0   255k    0%
 nr    1     7    0  576n |  27   69   1.1    29M    0%    0.0 |  27    3.0   249k    0%
 nr    1     7    0  480n |  27   69   1.1    29M    0%    0.0 |  27    0.0   258k    0%
CCCodelover commented 1 month ago

Dear Sir, Thanks for your swift reply. The brate value stuck up with 29 M even when the xApp is running.

RIC output is:

WARN[0000] /home/ubuntu/oran-sc-ric/docker-compose.yml: the attribute `version` is obsolete, it will be ignored, please remove it to avoid potential confusion 
1729647212397 7/RMR [INFO] ric message routing library on SI95 p=4560 mv=3 flg=00 id=a (f447e29 4.9.4 built: Dec 13 2023)
01:33:33 Send RIC Control Request to E2 node ID: gnbd_001_001_00019b_0 for UE ID: 0, PRB_min: 1, PRB_max: 5
Received RIC_CONTROL_ACK
01:33:38 Send RIC Control Request to E2 node ID: gnbd_001_001_00019b_0 for UE ID: 0, PRB_min: 1, PRB_max: 50
Received RIC_CONTROL_ACK
01:33:43 Send RIC Control Request to E2 node ID: gnbd_001_001_00019b_0 for UE ID: 0, PRB_min: 1, PRB_max: 5
Received RIC_CONTROL_ACK
01:33:48 Send RIC Control Request to E2 node ID: gnbd_001_001_00019b_0 for UE ID: 0, PRB_min: 1, PRB_max: 50
Received RIC_CONTROL_ACK
01:33:53 Send RIC Control Request to E2 node ID: gnbd_001_001_00019b_0 for UE ID: 0, PRB_min: 1, PRB_max: 5
Received RIC_CONTROL_ACK
^C01:33:58 Send RIC Control Request to E2 node ID: gnbd_001_001_00019b_0 for UE ID: 0, PRB_min: 1, PRB_max: 50

gnb output is:

       |--------------------DL---------------------|-------------------------UL------------------------------
 pci rnti | cqi  ri  mcs  brate   ok  nok  (%)  dl_bs | pusch  rsrp  mcs  brate   ok  nok  (%)    bsr     ta  phr
   1 4601 |  15 1.0   28    29M  994    0   0%  6.13M |  65.5   ovl   28   253k  100    0   0%     10      0  n/a
   1 4601 |  15 1.0   28    29M  994    0   0%  6.13M |  65.5   ovl   27   243k   97    0   0%      0      0  n/a
   1 4601 |  15 1.0   28    29M  993    0   0%  6.12M |  65.5   ovl   28   253k  100    0   0%      0      0  n/a
   1 4601 |  15 1.0   28    29M  994    0   0%  6.13M |  65.5   ovl   28   253k  100    0   0%      0      0  n/a
   1 4601 |  15 1.0   28    29M  994    0   0%  6.13M |  65.5   ovl   27   240k   98    0   0%      0      0  n/a
   1 4601 |  15 1.0   28    29M  994    0   0%  6.13M |  65.5   ovl   28   248k   98    0   0%      0      0  n/a
   1 4601 |  15 1.0   28    29M  993    0   0%  6.13M |  65.5   ovl   28   253k  100    0   0%      0      0  n/a
   1 4601 |  15 1.0   28    29M  994    0   0%  6.13M |  65.5   ovl   28   253k  100    0   0%      0      0  n/a
   1 4601 |  15 1.0   28    29M  994    0   0%  6.13M |  65.5   ovl   28   248k   98    0   0%      0      0  n/a
   1 4601 |  15 1.0   28    29M  994    0   0%  6.13M |  65.5   ovl   28   253k  100    0   0%      0      0  n/a
   1 4601 |  15 1.0   28    29M  993    0   0%  6.12M |  65.4   ovl   28   248k   98    0   0%      0      0  n/a

Best Regards @pgawlowicz

pgawlowicz commented 1 month ago

could you share your gnb logs?

dnaudts commented 1 month ago

Dear @pgawlowicz,

I am experiencing the same behaviour as explained by @CCCodelover . I am using recent versions of srsRAN and oran-sc-ric. When I have downlink UDP traffic (iperf3), I see a reported DL brate of 29M. When I start the simple_rc_xapp.py xApp script, it has no effect on the dl throughput of the UE. In attachment my gnb logfile and screenshots of the terminal output.

I noticed that it still was using an old version of oran-sc-ric. It was using wrong ran parameter ids, which seems to be fixed in the latest version. I had to run `docker compose up --build`. However, now my gnb crashes with the following error: `terminate called after throwing an instance of 'tl::bad_expected_access' what(): Bad expected access Aborted` Thanks and best regards [gnb.log.zip](https://github.com/user-attachments/files/17488221/gnb.log.zip) ![Screenshot 2024-10-23 at 11 11 34](https://github.com/user-attachments/assets/5ae24169-1697-43de-ab93-5d6a97d6a933) ![Screenshot 2024-10-23 at 11 12 42](https://github.com/user-attachments/assets/fa371042-5630-4c8e-9b99-8e08d9ac9393) ![Screenshot 2024-10-23 at 11 12 21](https://github.com/user-attachments/assets/0996eae8-7246-45a6-9302-da2e1ee5e59e) ![Screenshot 2024-10-23 at 11 12 09](https://github.com/user-attachments/assets/33bc667c-6836-47a4-8fc2-7eaa7968c48e) ![Screenshot 2024-10-23 at 11 11 45](https://github.com/user-attachments/assets/598a1ff8-0288-4079-b09f-cc2ce729b56f)
Keilwerth11270 commented 1 month ago

I am having similar issue. The simple xApp is able to influence PRB allocation and thus bitrate as shown in the srsRAN dashboard: grafana

However the downlink throughput is not being influenced at all as can be seen from the KPM Monitoring xApp output in the kpm_mon_xapp.log.

I have provided our gNB configuration: gnb_conf.txt

As well as the simple_xapp.log (meaning the output it prints). The RIC acknowledge message is there but the change is also seen from the grafana image as well.

I am attaching the gNB logs. They are quite large as I did an iPerf session to generate downlink traffic and wanted to provide as much samples as possible.

gnb_log_1.txt.zip gnb_log_2.txt.zip gnb_log_3.txt.zip gnb_log_4.txt.zip

I am using the previous release of srsRAN 24.04 on this machine, but I was facing similar issues with version 24.10, thank you for your time and support.

pgawlowicz commented 1 month ago

@Keilwerth11270 Please pull the newest srsRAN-Project release and try again. The version you are using (4ac5300d4) is from July.

pgawlowicz commented 1 month ago

@dnaudts: could you increase log level to debug and send new gnb logs?

dnaudts commented 4 weeks ago

@dnaudts: could you increase log level to debug and send new gnb logs?

The way I solved it, was using a slightly older version (commit [e8ceafd]) and changing manually the RAN parameter ids: 10 -> 11, 11 ->12, 12 -> 13. Then it worked.

pgawlowicz commented 4 weeks ago

yes, we are aware of this issue, it will be fixed in the next project version.

pengnist commented 3 weeks ago

I am experiencing the same issue. The only srsrRAN Project that works with the dockerized osc ric RC xapp is commit c4996c8ee.

pgawlowicz commented 3 weeks ago

It will be fixed in the next code version.