android-file-transfer-linux icon indicating copy to clipboard operation
android-file-transfer-linux copied to clipboard

Slow upload speed with 1000+ files

Open absolutelynothinghere opened this issue 2 years ago • 2 comments

Hello. First off I wanna say huge thanks for this app, it's quite comfortable to use unlike all the other CLI tools.

Second, I'm having an issue with slow uploads when uploading a lot (1000+) of files to my phone. The transfer speed would start high, then go lower and lower, reaching around 100 kB/s (for 5000+ files)... I'm not sure if this is due to the app or the Linux kernel.

A workaround is to manually copy files in "batches", so that the slowdown is not as drastic. This workaround is, of course, very tedious. Could this be implemented in the app? For example any upload operation gets automatically split into 500-1000 file batches to minimize slowdowns.

Thank you.

absolutelynothinghere avatar Nov 30 '21 13:11 absolutelynothinghere

I wonder why it happens. One of the reason could be that storage in your device is slower than your upload speed. Normally linux does all file operation through the cache. So your file start writing in write cache first. Then linux decide to flush some pages to the device. And if storage in your device is not fast enough this could result in read cache pages being evicted (all executables are just mapped to memory, and basically active pages are in read cache), so everything on the phone becomes very very slow and sluggish. Write pages make code page to be flushed and removed, then code page for some program needs to be read again, then linux wait until write page will be written and could be evicted, read that executable page again, and it happens over and over again :(

Can you test your IO speed on the phone somehow?

whoozle avatar Jan 08 '22 22:01 whoozle

Can you test your IO speed on the phone somehow?

If you know a way to do that, sure. Although I have a strong feeling that the problem isn't coming from the phone, because copying to it is smooth whenever I'm on Windows.

absolutelynothinghere avatar Jan 11 '22 10:01 absolutelynothinghere