Re: CGI quick cleanup
| From: | Edin Kadribasic | Date: | Fri, 23 Nov 2001 11:03:15 +0000 |
| Subject: | Re: CGI quick cleanup | ||
| References: | 1 2 3 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-71460@lists.php.net to get a copy of this message | ||
> > I have noticed the same problem with a scipt that used a very large
array
> > (~160 MB). The script run time was around 35 seconds, while it took over
4
> > minutes to shut down! Same amount of time was used in trying to unset()
the
> > array.
>
> [wild guess]
> probably the memory deallocation is the one expensive here.
Probably true. But there is a big performance problem here, and I think it
should be looked at. I cannot belive that 4 minutes to deallocte 160 MB ram
is the best we can do on a 1 GHz machine with 1GB ram.
> BTW, don't use large arrays in PHP as Apache module cause when the process
> grows requesting more memory (brk(2)) it cannot release it back to the
> system (because the httpd process is still running).
I'm aware of this, but this was command line script so that was not a
problem.
Edin