Greetings, i've got a Pentium 4 1U server with 1 G of RAM. Im building a chat engine in PHP, and just figured out that my output frame, which is a script that runs foreever, is a real memory hunger.
Take this very simple script for instance :
<php
set_time_limit(0);
while(!connection_aborted())
{
print 'output' . "\n";
usleep(500000);
}
?>
This script consumes 0.4% of the available memory, right when it starts ... thats about 3615.136 K of my 903784K of memory available on the server, which is approx 3.5 MB of RAM.
The real output script actually consumes a little more, that is approx 5.3 MB of RAM
That seams too much.
Running RH Linux 7.3 with PHP 4.2.3 as a CGI for Apache 1.3.x
Your impressions ?