Bug #80061 [Asn->Csd]: Copying large files may have suboptimal performance

From: Date: Mon, 21 Sep 2020 14:11:36 +0000
Subject: Bug #80061 [Asn->Csd]: Copying large files may have suboptimal performance
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-229114@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=80061&edit=1 ID: 80061 Updated by: cmb@php.net Reported by: cmb@php.net Summary: Copying large files may have suboptimal performance -Status: Assigned +Status: Closed Type: Bug Package: Performance problem Operating System: * PHP Version: 7.4Git-2020-09-04 (Git) Assigned To: cmb Block user comment: N Private report: N New Comment: Fixed as <http://git.php.net/?p=php-src.git;a=commit;h=19c844594e40d79cea016b54f9ab3a367440b4c9>. Previous Comments: ------------------------------------------------------------------------ [2020-09-04 16:56:53] cmb@php.net The following pull request has been associated: Patch Name: Fix mmap copying On GitHub: https://github.com/php/php-src/pull/6078 Patch: https://github.com/php/php-src/pull/6078.patch ------------------------------------------------------------------------ [2020-09-04 16:29:42] cmb@php.net Description: ------------ As of PHP 7.4.0, large files are supposed to be copied by mapping them into virtual memory at once. That obviously can't work for files which are larger than any possibly free memory segment. So copying files of 1 GiB or 2 GiB is not unlikely to fail for x86 architectures, for instance. If the memory mapping fails, we fall back to reading and writing in small chunks, which has suboptimal performance. See also <https://github.com/php/php-src/pull/5319#issuecomment-605901029>. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=80061&edit=1

« previous php.bugs (#229114) next »