Re: Allowed mem size exhausted

From: Date: Wed, 06 Aug 2003 00:31:07 +0000
Subject: Re: Allowed mem size exhausted
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-158380@lists.php.net to get a copy of this message
Thanks! Would anyone care to expand on the "tools" or the methods for preparing on disk??? Thanks again! -Shawn "Curt Zirzow" <curt@zirzow.dyndns.org> wrote in message news:20030805194156.GF21938@bagend.shire... > * Thus wrote David Nicholson (me@djnicholson.com): > > 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."

« previous php.general (#158380) next »