* Thus wrote David Nicholson ([EMAIL PROTECTED]):
> Hello,
> 
> This is a reply to an e-mail that you wrote on Tue, 5 Aug 2003 at
> 17:57, lines prefixed by '>' were originally written by you.
> > I would prepare the file on disk instead of memory. If you do
> > increase the memory to handle bigger files, what happens when you
> > get 10 requests at the same time?  about 80MB of memory used.
> 
> Correct me if I am wrong but would it not be better to use the
> functions he is currently using (which prepare the data in volitile
> memory) for as long as they allow for this.  The OS should then
> realise when it does not have enough physical RAM for each of the
> requests and handle swapping onto disk itself as and when it is
> needed.  This would mean you haven't got the overheads of writing
> lots of data to disk, just to delete it again when you do only have
> one request at a time and have plenty of RAM spare to take care of
> the operation.

Better all depends on the situation.

Now if one script forces your whole system to start using swap, I
think there is something wrong. The system should never swap unless
under heavy load.  And even then, things should be changed so that
the system does not swap EVER.

Having one script be inefficient is better than having the whole
system brought down to its knees (and perhaps die due to lack of
swap.)

if only one person will be accessing the script at one time there
isn't any issues, but I would always be weary of loading 8MB of
data into one script, excpecially when there are tools readily
available.

Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to