my5G / my5G-RANTester

my5G-RANTester is a gNB/UE simulator for studying 3GPP standards and stressing a 5G core.
Apache License 2.0
97 stars 34 forks source link

Issue connecting more than 255 UEs #40

Open gabriel-lando opened 2 years ago

gabriel-lando commented 2 years ago

Hi, I'm trying to connect many UEs using the load-test.

The free5GC v3.0.6 stops the Data Plane connection after about 10 devices. The Open5GS v2.3.6 can connect exactly 255 UEs with the data plane before stops registering new devices.

I tried to update the free5GC to v3.2.1 (the latest stable version - I'm using this repository) and, after running the load-test with 1000 devices, it stopped connecting exactly after 255 successful connections, the same behavior as the Open5GS core. Btw, the latest version of the free5GC WebUI allows us to insert a lot of IMSI at the same time.

Taking a look at the context.go file, I saw that you are using a uint8 variable to store the device ID on lines 34 and 50. Is it possible that this uint8 id could cause this weird behavior?

Also, I noticed that after near to 400 UEs, the tester crashes with a Broken pipe error in both cores.

Thanks :)

baleeiro17 commented 2 years ago

Hi, gabriel-lando!

I tried to update the free5GC to v3.2.1 (the latest stable version - I'm using this repository) and, after running the load-test with 1000 devices, it stopped connecting exactly after 255 successful connections, the same behavior as the Open5GS core. Btw, the latest version of the free5GC WebUI allows us to insert a lot of IMSI at the same time.

Maybe you can share the logs of free5gc of AMF, SMF, UPF and Tester (latest stable version please) then I can investigate more deep the problem, please.

Also, I noticed that after near to 400 UEs, the tester crashes with a Broken pipe error in both cores.

Yes, I think it might be a problem with my5GRANTester as I haven't tested it with such a large number of UEs. The source of the problem, I think it could be this service.go file as well, maybe linux does not allow to create of 400 virtual interfaces for the 400 UEs, this explains the broken pipe error.

gabriel-lando commented 2 years ago

Hi baleeiro17, thanks for your answer :)

I'm using the code on the master branch (I changed this Dockerfile because of the code on the branch v1.0.0 crashes when I try to run the load-test with more than 1 UE during the creation of the data plane.

I'm using this startup string: ./app load-test -n 1000. My setup: VM with Ubuntu Server 20.04 and Kernel 5.4.90-050490-generic with 8GB of RAM and 8 vCore.

Follow the log for the execution using the free5GC v3.2.1 and the master branch of the tester. Log: my5grantester-master_free5gc-v3.2.1.txt

On this execution, I could register and create the data plane for 255 devices, after that, I received a lot of errors ([GNB][GTP] N3 GTP/UDP is not setting) and the tester crashed a few moments after.

Edit: Adding logs for free5GC v3.0.6 and Open5GS v2.3.6:

During the execution using free5GC v3.0.6, it stops connecting the data plane after about 10 devices (sometimes it connects only 9, sometimes 10), but the execution keeps until the end (1000 devices), without the data plane, but registering the device. In this case, I suspect the issue is inside the free5GC core. Log: my5grantester-master_free5gc-v3.0.6.txt

For the Open5GS, the behavior is the same as using the latest version of the free5GC, it connects 255 devices and then stops connecting (and registering) until the tester crashes with the error broken pipe. Log: my5grantester-master_open5gs-v2.3.6.txt