|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #35879 Low performance for fpassthru()
Submitted: 2006-01-03 10:32 UTC Modified: 2016-08-14 04:22 UTC
From: sentomas at hotmail dot com Assigned: cmb (profile)
Status: No Feedback Package: *General Issues
PHP Version: 5.1.1 OS: FBSD/LINUX/UNIX
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 — but make sure to vote on the bug!
Your email address:
Solve the problem:
18 + 37 = ?
Subscribe to this entry?

 [2006-01-03 10:32 UTC] sentomas at hotmail dot com
I was trying to use fpassthru to runing a fileservice web host. 
But when the web server request at a large scale, like 100 more requests for different files at same time. The fpassthru() bring the server load up to 30 even 150, and OS have to use large amount swap to fullfill the buffer request from fpassthru(). Which we all know its extrem high for unix system.

We all know unix provide an easy way to output file data via sendfile() which avoid resouce copy between users but direct cope filepoint to socket. 

I know its might be diffcult to oprerate on webserver socket from PHP as FCGI or mod. But I really hope there is another way to improve fpassthru() to some real large scale usage. Otherwise I have to rewrite a httpd by myself to server for dymatic file service request. :(


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2016-08-04 17:24 UTC]
-Status: Open +Status: Feedback -Package: Feature/Change Request +Package: *General Issues -Assigned To: +Assigned To: cmb
 [2016-08-04 17:24 UTC]
Does this issue still persist? PHP 5.1.1 has been quite a while

BTW: can't you use readfile()?
 [2016-08-14 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue May 28 10:01:31 2024 UTC