![](https://i.imgur.com/JORnn3y.png =150x)@NTUST # [Dawn] Demo of RIC benchmarking - Reference:[RIC benchmarking (OSC)](https://wiki.o-ran-sc.org/display/RICP/RIC+benchmarking) & [Build e2simul:0.0.2 (Yueh-Huan Note)](https://hackmd.io/@Yueh-Huan/Hy3ZMJBeu) & [Run e2simul:0.0.2 (Yueh-Huan Note)](https://hackmd.io/@Yueh-Huan/Hy81ferlO) :::info **Introduction:** - Performance RIC benchmarking is a feature that aims to **provide the performance metrics** on both the RAN and Near-RT RIC platform. - It involves the **communication of E2 simulator from RAN side to Near-RT RIC platform** infrastructure that uses the xApp onboarded on RIC platform. - The Bouncer xApp **interacts messages with E2 simulator** through the Near RT RIC platform pods and **records the time that provides metrics on latency/throughput on the RIC platform and on the xApp onboarded** on RIC platfom. **Aims:** - [x] [Check Point 1:Bouncer xApp interacts with E2simulator using the Near- RT RIC platform for sending the RIC Subscription Request and receiving Response for the same.](#42-Logs-of-E2SIM) - [x] [Check Point 2:Bouncer xApp receives the RIC indication and sends the Control Message.](#41-Logs-of-bouncer-xApp) - [x] [Check Point 3:This communication is stored in a file with timestamp to determine the latency/throughput as part of Performance RIC benchmarking purpose.](#5-Result) ::: ## 1. Flow for reference only ![](https://i.imgur.com/zb7jlpw.png) ![](https://i.imgur.com/FhYyJWd.png) ## 2. Install E2SIM ### 2.1 Prepare source code ``` shell= git clone "https://gerrit.o-ran-sc.org/r/it/test" cd test/ric_benchmarking/e2-interface/e2sim/e2sm_examples/kpm_e2sm/ ``` ![](https://i.imgur.com/DH3vBZ1.png) ### 2.2 Modify the Dockerfile - Find the address of the e2term-sctp-alpha: ``` shell= kubectl get service -n ricplt ``` ![](https://i.imgur.com/UyqoI3p.png) - Modify the address of service-ricplt-e2term-sctp-alpha in the Dockerfile: ``` shell= vim Dockerfile ``` ![](https://i.imgur.com/Sf3kOm7.png) ![](https://i.imgur.com/Elql84O.png) ### 2.3 Build image ``` shell= docker build -f Dockerfile -t nexus3.o-ran-sc.org:10002/oran-ric/e2simulator:2.0.0 . ``` ![](https://i.imgur.com/GWIBY0h.png) ### 2.4 helm install - Restart the e2mgr & e2term: ``` shell= kubectl rollout restart deployment --namespace ricplt deployment-ricplt-e2mgr deployment-ricplt-e2term-alpha ``` ![](https://i.imgur.com/PuBXe8o.png) - Modify the namespace: ``` shell= cd helm vim values.yaml ``` ![](https://i.imgur.com/TKA15jG.png) ![](https://i.imgur.com/RZ5S1w4.png) - Helm install: ``` shell= helm install -n e2sim . --namespace ricplt ``` ![](https://i.imgur.com/zn8QN2l.png) - Check the pod of the e2sim: ``` shell= kubectl get pod -n ricplt ``` ![](https://i.imgur.com/7KugQKL.png) ## 3. Deploy the bouncer xApp ### 3.1 On-board the bouncer xApp ``` shell= touch bouncer.json vim bouncer.json ``` ![](https://i.imgur.com/bRlN0NX.png) ``` json= { "config-file.json":{ "xapp_name": "bouncer-xapp", "version": "2.0.0", "containers": [ { "name": "bouncer-xapp", "image": { "registry": "nexus3.o-ran-sc.org:10004", "name": "o-ran-sc/ric-app-bouncer", "tag": "2.0.0" } } ], "messaging": { "ports": [ { "name": "rmr-data", "container": "bouncer-xapp", "port": 4560, "rxMessages": ["RIC_SUB_RESP", "RIC_INDICATION"], "txMessages": ["RIC_SUB_REQ"], "policies": [1], "description": "rmr receive data port for Bouncer xApp" }, { "name": "rmr-route", "container": "bouncer-xapp", "port": 4561, "description": "rmr route port for Bouncer xApp" } ] }, "rmr": { "protPort": "tcp:4560", "maxSize": 2072, "numWorkers": 1, "txMessages": ["RIC_SUB_REQ"], "rxMessages": ["RIC_SUB_RESP", "RIC_INDICATION"], "policies": [1] } } } ``` ![](https://i.imgur.com/AifWYI0.png) ``` shell= curl --location --request POST "http://<Your Kong IP>:32080/onboard/api/v1/onboard" --header 'Content-Type: application/json' -d "@bouncer.json" ``` ![](https://i.imgur.com/TZQi2yZ.png) ### 3.2 Deploy the bouncer xApp ``` shell= curl --location --request POST "http://<Your Kong IP>:32080/appmgr/ric/v1/xapps" --header 'Content-Type: application/json' --data-raw '{"xappName": "bouncer-xapp"}' -v ``` ![](https://i.imgur.com/2XydEZf.png) ## 4. Check the logs ### 4.1 Logs of bouncer xApp ![](https://i.imgur.com/U7pnlHL.png) ![](https://i.imgur.com/KYR6FeW.png) ![](https://i.imgur.com/vxC3TYW.png) ### 4.2 Logs of E2SIM ![](https://i.imgur.com/wSkKshU.png) ![](https://i.imgur.com/CyMghCL.png) ![](https://i.imgur.com/Uys2KoB.png) ![](https://i.imgur.com/k3MsswQ.png) ![](https://i.imgur.com/vk28jZb.png) ![](https://i.imgur.com/eUOiSIJ.png) ![](https://i.imgur.com/wWk7Lj6.png) ![](https://i.imgur.com/CAK8Y4o.png) ![](https://i.imgur.com/299UUYG.png) ![](https://i.imgur.com/gVGP2mV.png) ![](https://i.imgur.com/TfGT0dS.png) ## 5. Result - Round trip time for each interaction are **recorded and stored in the timestamp.txt file** that gets created in the container ### 5.1 Bouncer xApp - Find the pod of the bouncer xapp: ``` shell= kubectl get pod -n ricxapp ``` ![](https://i.imgur.com/9UiTrTc.png) - Enter the container of the bouncer xapp: ``` shell= kubectl exec -it <bouncer xapp pod> -n ricxapp /bin/bash ls ``` ![](https://i.imgur.com/fxn01bm.png) - View the file "timestamp.txt" ``` shell= cd tmp ls cat timestamp.txt ``` ![](https://i.imgur.com/J30WWGS.png) ![](https://i.imgur.com/nJKvmYv.png) ### 5.2 E2SIM - Find the pod of the E2SIM: ``` shell= kubectl get pod -n ricplt ``` ![](https://i.imgur.com/yaiLkI3.png) - Enter the container of the E2SIM & View the file "e2sim_timestamp.txt": ``` shell= kubectl exec -it <E2SIM pod> -n ricplt /bin/bash ls cat e2sim_timestamp.txt ``` ![](https://i.imgur.com/tINAmxk.png) ## Record of Bug & Solution ### Bug:Subscription Failed The E2SIM can't receive the Subscription request from the bouncer xApp, and the bouncer xApp send the request over and over. - Log of the e2sim ![](https://i.imgur.com/xzUVbf2.png) - Log of the bouncer xApp ![](https://i.imgur.com/R43YCRv.png) ### Solve - Restart the e2sim ``` shell= kubectl rollout restart deployment --namespace ricplt e2sim ``` - Restart the bouncer xapp ``` shell= kubectl rollout restart deployment --namespace ricxapp ricxapp-bouncer-xapp ``` - You had tried to restart the e2sim and bouncer xapp, but it still failed. Maybe you need to check the logs of rtmgr & e2mgr & e2term, you can try to the following commands to solve it. ## Command which you could use ### Undeploy xApp ``` shell= curl --location --request DELETE "http://<Your Kong IP>:32080/appmgr/ric/v1/xapps/bouncer-xapp" --header 'Content-Type: application/json' ``` ### Restart - rtmgr ``` shell= kubectl rollout restart deployment --namespace ricplt deployment-ricplt-rtmgr ``` - e2mgr & e2term ``` shell= kubectl rollout restart deployment --namespace ricplt deployment-ricplt-e2mgr deployment-ricplt-e2term-alpha ``` - e2sim ``` shell= kubectl rollout restart deployment --namespace ricplt e2sim ``` ### Redeploy xApp ``` shell= curl --location --request POST "http://<Your Kong IP>:32080/appmgr/ric/v1/xapps" --header 'Content-Type: application/json' --data-raw '{"xappName": "bouncer-xapp"}' -v ```