librespeed / speedtest-android

Android app template for Librespeed servers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

App presents wrong results in cell phone

MarceloTabian opened this issue · comments

When I tried the App in two cell phones, I got high ping delays, low download speed and extremely low upload speed.

From one cell phone to Helsinki:

ping 290ms
jitter 253ms
download 7.65 Mbps
upload 0.72 Mpps

From Emulator to Helsinki (computer running the emulator is connected to the same router as the cell phone)

ping 133ms
jitter 1.32ms
download 41.4 Mpbs
upload 35.0 Mbps

Measuring my internet speed using from the cell phone to Google, using chrome in the cell phone)

latency 9ms
download 39.9 Mbps
upload 28.3 Mbps

Measuring my internet speed using from computer to Google, using chrome in the computer

latency 9ms
download 89.9 Mbps
upload 52.5 Mbps

So, results using the app are always slower then using Chrome, but in the cell phone the effect is much stronger.

I compiled the app using Android Studio and generated an APK, which I sideloaded into the cellphone.

The cellphone is a Galaxy A10s. I tried with another, and got similar results.

I wouldn't have released the app if it had such a massive bug.

I have no idea what's causing your problem, could just be that my demo server was overloaded at the time. Does this happen consistently? On all networks?

I cloned the project again, generated a new APK and installed it on the cell phone.

Still got the wrong results.

Is there an APK that I could download to see if it produces different results than the APK that I generated myself?

The problem is not your server. I also tried a self hosted server (I got the docker image) and still had problems, though less prominently.

From one cell phone to self hosted server:

ping 71.5ms
jitter 90.0 ms
download 14.4 Mbps
upload 3.18 Mpps

From Emulator to Helsinki (computer running the emulator is connected to the same router as the cell phone)

ping 37.5 ms
jitter 4.97 ms
download 25.6 Mpbs
upload 36.1 Mbps

The upload bandwidth of my server is probably not high, so this explain why the download speed using the emulator was smaller then the upload speed.

However, the main problem is getting results that are much slower using a real cell phone than with the emulator. I already tried two, but will try more.

I committed a mistake in the previous post. The test using the emulator was also to the self hosted server, not to Helsinki.

That is so weird.
Does this happen with my original APK?

I'm sure you've noticed while working on your fork that the android version basically opens a socket and uploads/downloads stuff over multiple threads, there is not much that can go wrong on the client side.

I tried you APK. The problem is still there.

From cell phone to Hensinki

ping 305
jitter 59
download 59,6
upload 0,85

I will try with another cell phone and update you.

I have not tried the other cell phone, but I have tried the speedtest.net App in my cell phone and it does not present the same problem.

I also have used Chrome, from the same cell phone, to access my self hosted LibreSpeed server and the test also went ok.

So the problem only occurs with this specific App.

I read the code and also don't have any explanation for what is happening.

I tried to remove some sleeps in the, tried to use a smaller buffer to avoid provoking the garbage collector, I tried using more threads, I tried using only one thread and nothing important changed.

I searched the net looking for anybody mentioning something similar, but till now, found nothing useful.

What about CPU and GPU usage? You should be able to enable some performance counters in the developer settings. I seriously doubt that this is the issue though.

Closed for inactivity