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 <1551104652.5.0.0308018800709.issue36103@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2019-02-25 14:24:12desbmasetrecipients: + desbma, methane
2019-02-25 14:24:12desbmasetmessageid: <1551104652.5.0.0308018800709.issue36103@roundup.psfhosted.org>
2019-02-25 14:24:12desbmalinkissue36103 messages
2019-02-25 14:24:12desbmacreate