Re: [PHP-DEV] HUGE memory consumption on fread()

2002-08-14 Thread Wez Furlong
Potentially, yes, depending on how well your OS handles this, and how often the script is called and so on. Under linux, with reasonable amounts of RAM, and assuming that the script is called frequently enough for the OS not to re-use the buffers, after the first hit (that maps the file) I'd expe

Re: [PHP-DEV] HUGE memory consumption on fread()

2002-08-14 Thread Joost Lek
oh sorry, my previous reply didn't CC the mailing list. the problem has been solved now, it was indeed the output buffering :( Wez Furlong wrote: >On 08/14/02, "Zeev Suraski" <[EMAIL PROTECTED]> wrote: > > >>Any chance you're using output buffering? >> >> > >Hopefully you are just using o

Re: [PHP-DEV] HUGE memory consumption on fread()

2002-08-14 Thread Andrey Hristov
> > Once you've eliminated that problem, I'd suggest that you > use readfile() instead of manually looping; readfile should > be much kinder to your hardware as it uses mmap, which means > that PHP doesn't need to keep allocating small buffers in the loop, > and that the OS can potentially share t

Re: [PHP-DEV] HUGE memory consumption on fread()

2002-08-14 Thread Wez Furlong
On 08/14/02, "Zeev Suraski" <[EMAIL PROTECTED]> wrote: > Any chance you're using output buffering? Hopefully you are just using output buffering; check for settings in your php.ini or apache configuration such as zlib.output_compression, output_buffering, output_handler. If that doesn't seem to

Re: [PHP-DEV] HUGE memory consumption on fread()

2002-08-14 Thread Zeev Suraski
Any chance you're using output buffering? Zeev At 12:25 14/08/2002, Joost Lek wrote: >Hello everyone, > >I am new to this list, but urgently in need of a solution for a problem i >am currently facing. >First, i'll give a description of my current platform: >Linux 2.4.18 (origninally slackware,

[PHP-DEV] HUGE memory consumption on fread()

2002-08-14 Thread Joost Lek
Hello everyone, I am new to this list, but urgently in need of a solution for a problem i am currently facing. First, i'll give a description of my current platform: Linux 2.4.18 (origninally slackware, heavily modified) apache 1.3.22 php 4.1.2 mysql 3.23.46 (i am aware that these are not the la