This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author desbma
Recipients desbma, methane
Date 2019-02-25.14:24:12
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
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.
Date User Action Args
2019-02-25 14:24:12desbmasetrecipients: + desbma, methane
2019-02-25 14:24:12desbmasetmessageid: <>
2019-02-25 14:24:12desbmalinkissue36103 messages
2019-02-25 14:24:12desbmacreate