Bug #80061 [PATCH]: Copying large files may have suboptimal performance
| From: | cmb@php.net | Date: | Fri, 04 Sep 2020 16:56:54 +0000 |
| Subject: | Bug #80061 [PATCH]: Copying large files may have suboptimal performance | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-228890@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
Patch added by: cmb@php.net
Reported by: cmb@php.net
Summary: Copying large files may have suboptimal performance
Status: Assigned
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:
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
Previous Comments:
------------------------------------------------------------------------
[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