I'm testing fuse wrapper for mtp filesystem and it's incredibly slow using dolphin (10 times slower than direct usb bulk transaction, ~1-2Mb/s versus 10-15Mb/s). I found out that dolphin ignores f_bsize from statvfs structure, which indicates filesystem block size and uses 4096 bytes buffer for copying. I believe that writing in fylesystem block sizes, is better way, because filesystem driver writes incompleted blocks to device which could be ineffective, in a case of mtp, overhead of partial write to object is rather big, so I set block size to 1Mb. So, the buffer's size might be something like: max(4096, f_bsize). Reproducible: Always Steps to Reproduce: 1. Clone and build https://github.com/whoozle/android-file-transfer-linux 2. Connect any mtp device 3. Run ./afs-mtp-mount -d -f <mountpoint> 4. See fuse logs. Actual Results: Data is read/written in 4096 bytes blocks. Expected Results: Data is read/written in f_bsize bytes blocks.
Is this still an issue with KDE Frameworks 5.47 and Dolphin 18.04.x?
(In reply to Nate Graham from comment #1) > Is this still an issue with KDE Frameworks 5.47 and Dolphin 18.04.x? Soft of. This problem has been leveraged by increasing IO size in recent versions, it's 128K now. But it's still not taking f_frsize/f_bsize into account.
Thanks for the update! So the slowness of not respecting f_bsize manifested when you used Dolphin to move or copy a file (via copy-paste or drag-and-drop) to a local mount for an MTP device?
(In reply to Nate Graham from comment #3) > Thanks for the update! So the slowness of not respecting f_bsize manifested > when you used Dolphin to move or copy a file (via copy-paste or > drag-and-drop) to a local mount for an MTP device? Yes, it was like that. Current value 128K is enough for everyone © Almost I think it's generally good practive to align IO size to size of filesystem block, so filesystem will not squeeze your data into any tail-space in case of small write, etc. My MTP implementation uses partial reads/writes to avoid full object sending/retrieval, making MTP as fast as any other way to transfer data from/to device. The problem with partial objects, it's done from userspace on android, and this approach has an additional overhead of starting/committing object transaction. I've decided to advertise large block size to userspace, it worked with some other file managers, but not the dolphin. :) Thanks
Thanks for the info! As soon as I figure out where this setting is located, I'll submit a patch. If you know where I can find it, please don't be shy! :)
Nate, the f_bsize setting can be found via http://man7.org/linux/man-pages/man3/statvfs.3.html But I am not sure if KIO should look at it. My filesystem block size reports 4K, so general file copying would get slower respecting it compared to the 128K value we use now.
If the default value is good enough now, and respecting the system's value might be worse, maybe we should close this?
> If the default value is good enough now, and respecting the system's value might be worse, maybe we should close this?
Dear Bug Submitter, This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging If you have already provided the requested information, please mark the bug as REPORTED so that the KDE team knows that the bug is ready to be confirmed. Thank you for helping us make KDE software even better for everyone!
This bug has been in NEEDSINFO status with no change for at least 30 days. The bug is now closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging Thank you for helping us make KDE software even better for everyone!