D25079: [CopyJob] Increase the amount of data sendfile can copy at once
Méven Car
noreply at phabricator.kde.org
Wed Oct 30 18:17:44 GMT 2019
meven marked 2 inline comments as done.
meven added inline comments.
INLINE COMMENTS
> file_unix.cpp:58
> +// Defaults to 5MB so the user can follow copy progress
> +#define SENDFILE_CHUNK_SIZE (5 * 1024 * 1024)
> #endif
I have reduced the value to 5 MB so that users can still follow progress, otherwise the progress bar would move every 2,147,479,552 bytes copied.
This value is quite arbitrary. I suspect I should use a lower value.
The best value we could have depends on the actual speed of the drive we are writing to, so we can have regular user feedback and maximum speed.
We would need an adaptative value, so that the chunk size would match our desired progress report frequency, for instance each half second.
An algorithm could be:
Start with a low chunk value size.
Compute speed = copied bytes/second obtained, if chunk < speed, double chunk size.
If chunk > speed, decrease a little chunk.
In the meantime this patch should help things already.
I may work on such an algorithm and implementation.
REPOSITORY
R241 KIO
REVISION DETAIL
https://phabricator.kde.org/D25079
To: meven, dfaure, #frameworks, davidedmundson
Cc: ahmadsamir, sitter, apol, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20191030/24ed69b4/attachment-0001.html>
More information about the Kde-frameworks-devel
mailing list