free5gc / free5gc

Open source 5G core network base on 3GPP R15
https://free5gc.org
Apache License 2.0
1.85k stars 607 forks source link

VM of N3IWUE has slow upload in speedtest #535

Open SimonWelke opened 4 months ago

SimonWelke commented 4 months ago

Hello free5gc,

I followed your tutorial for the N3IWUE one-to-one (i.e. two VMs for free5GC and N3IWUE etc.) and it worked straight away. Good work on your part!

However, I noticed that a simple speedtest (installed with "sudo apt speedtest-cli") gives unexpected results. The download on the VM for the N3IWUE delivers over 100Mbit/s, which matches my internet connection, but the upload barely hits 1Mbit/s.

To be on the safe side, I also ran the speedtest on my host system (fast PC with Ubuntu 22.04) and in the VM for free5gc - both DL and UL are very fast and well above 100Mbit/s.

Do you have any idea why the uplink is so slow during a speedtest in the VM of the N3IWUE?

Simon

a3828162 commented 4 months ago

Hello @SimonWelke, I have used speedtest-cli for testing and encountered a similar situation as yours. However, since speedtest-cli is not an ideal tool for measuring network speed and lacks parameter adjustment capabilities, I switched to using iperf3 for testing. You can install iperf3 by running sudo apt install iperf3 -y. Initially, I faced similar issues with TCP flow where the traffic couldn't go through properly. Upon checking iperf3 issues, I found similar problems reported by others. Later, by referring to their configurations regarding iperf3 buffer size, window size, and setting MSS, the situation improved significantly, as shown in the screenshot. https://github.com/esnet/iperf/issues/1021?fbclid=IwAR1ESeRB_jpolUKO0Z9UdUSeYClJV9BCVmsHxRllszb2YPm06GEitpoof5Y

截圖 2024-03-05 下午1 34 16

I suspect that the default buffer size and window size were too small, leading to packet loss and other issues preventing the traffic from flowing properly. We will continue to monitor this situation.

Best regards, James