desbma <dutch...@gmail.com> added the comment:
Your first link explains why 128kB buffer size is faster in the context of cp: it's due to fadvise and kernel read ahead. None of the shutil functions call fadvise, so the benchmark and conclusions are irrelevant to the Python buffer size IMO. In general, the bigger buffer, the better, to reduce syscall frequency (also explained in the article), but going from 16kB to 128kB is clearly in the micro optimization range, unlikely to do any significant difference. Also with 3.8, in many typical file copy cases (but not all), sendfile will be used, which makes buffer size even less important. ---------- nosy: +desbma _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue36103> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com