erickok / transdroid

Manage your torrents from your Android device
GNU General Public License v3.0
1.32k stars 201 forks source link

Transdrone reports wrong ETA from aria2c #574

Open pitsi opened 4 years ago

pitsi commented 4 years ago

So, I have set up aria2c to run as a deamon and I control it via ariang from a web browser or via transdrone from my android phones. Ariang reports the right eta, but transdrone does not. E.g, in the image below, the eta for the file being downloaded was like 15-20 minutes max. However, transdrone reported 1+ hour! And it is a direct download, not a torrent one!

Screenshot_20201021-072656

Aria2c 1.35.0, transdrone 2.5.19, installed from the play store on a nokia 5 running android 9.

erickok commented 4 years ago

Hmm. This is calculated: https://github.com/erickok/transdroid/blob/6f07529b6a7742af78d621541b0e445fcc035175/app/src/main/java/org/transdroid/daemon/adapters/aria2c/Aria2Adapter.java#L376 and I don't really see any bug there... at the same time in your screenshot you need still about 0,19GB which at 984,5KB/s should complete in very roughly 3 minutes... so I'm not sure yet what's going on here. Needs to be debugged.

pitsi commented 4 years ago

I have aria2c's speed capped at 1200kb/s. The above was probably a random drop. I had not calculated the exact amount of time it would take to complete, I just relied on what ariang showed a few minutes ago.

The rest of aria2c's settings

enable-rpc=true
rpc-allow-origin-all=true
rpc-listen-all=true
disable-ipv6=true

on-download-complete=beep -f 4000 -l 50 -r 2

max-download-limit=1200K
file-allocation=none
dir=/mnt/Public/TEMP/

daemon=true

---edit And now it works as it should... I tried a 1gb file from a different server and its eta seems correct. The same eta is mention in ariang as well.

Screenshot_20201022-181458

The file mentioned above is a w10 iso from here https://www.microsoft.com/en-us/software-download/windows10ISO

Feel free to close the issue if it does not reproduce on your side.

pitsi commented 3 years ago

New iso from ms, new download in aria2c, same issue. I waited until there were less than 10 minutes for completion.

Screenshot_20201203-205912

pitsi commented 3 years ago

I downloaded the x64 iso earlier and I got the same issue. In case it helps, I think that the ETA reported in transdrone remains the same throughout the procedure and it just fluctuates depending on the speed it gets on that specific time.

e.g. Lets say that a 4gb file will take 1 hour to complete at my full speed of 1.2MB/s. If the speed drops, regardless when or how much of the file is already downloaded, the ETA will rise to a larger value, and the other way round. However, it will never drop below that 1 hour. It is as if the calculation for the ETA always takes into consideration the entire file size, not the one that is already downloaded.

On the other hand, the above may be caused by something which is serverside... so no wonder it has happened only with downloads from ms so far.

pitsi commented 3 years ago

Same thing with the newest iso from ms. What if the problem is cause by microsoft's servers? Is there anything below 2gb that comes from to test it further?

Screenshot_20210518-204526