php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #80061 Copying large files may have suboptimal performance
Submitted: 2020-09-04 16:29 UTC Modified: 2020-09-21 14:11 UTC
From: cmb@php.net Assigned: cmb (profile)
Status: Closed Package: Performance problem
PHP Version: 7.4Git-2020-09-04 (Git) OS: *
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
21 - 3 = ?
Subscribe to this entry?

 
 [2020-09-04 16:29 UTC] 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>.



Patches

Add a Patch

Pull Requests

Pull requests:

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-09-04 16:29 UTC] cmb@php.net
-Assigned To: +Assigned To: cmb
 [2020-09-04 16:56 UTC] 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-21 14:11 UTC] cmb@php.net
-Status: Assigned +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 21:01:30 2024 UTC