NYCPHP Meetup

NYPHP.org

[nycphp-talk] Fastest PHP Writing

Michael B Allen ioplex at gmail.com
Wed Mar 17 21:05:11 EDT 2010


Hi Ed,

I very much doubt exec-ing and then backticking (which is forks and
then execs again) would achieve the desired result.

One thing that might, would be to write a long-lived daemon that opens
the file(s) being appended to and waits for data on a named pipe. PHP
callers can just open the pipe, write data to it, close and move on.
The deamon would read the data and write it to the desired descriptor.
Meanwhile the calling PHP process is probably off doing other things
by then.

Mike

-- 
Michael B Allen
PHP Active Directory Integration
http://www.ioplex.com/plexcel.html

On Wed, Mar 17, 2010 at 7:45 PM, CED <consult at covenantedesign.com> wrote:
> List,
>
> I am doing some tests on PHP write speeds and concurrency and was wondering
> if anyone has done the same?
>
> I am currently testing -
>   fopen('filethingy', 'a')
>   passthru()
>   exec()
>   `echo "stuff" >> filethingy.txt`
>
> Basically I am trying to find the most incredibly fast way to append to a
> file, and support a massive potential concurrency (think huge logging system
> for an ISP etc.).
>
> -Ed
>
> _______________________________________________
> New York PHP Users Group Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
>
> http://www.nyphp.org/Show-Participation
>



More information about the talk mailing list