Re: Ability to lower PHP memory usage

From: Date: Fri, 09 Jan 2004 07:09:16 +0000
Subject: Re: Ability to lower PHP memory usage
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-6918@lists.php.net to get a copy of this message
On Thu, 8 Jan 2004, Ilia Alshanetsky wrote: > On January 08, 2004 04:11 pm, Zeev Suraski wrote: > > Well, if we really get to save 100K as Ilia imagined, for a thousand > > children, it's 100MB, and there are those with more. I doubt we can easily > > get 100K though. > > 'Freeing' 100k is not as difficult as it sounds in PHP 5 when you consider > that 4 object files (filters.o 14460, ftp_fopen_wrapper.o 13616, info.o > 13868, streamsfuncs.o 13408) make up for more then 1/2. Add (url_scanner_ex.o > 12304, var.o 14616 image.o 11432,var_unserializer.o 5984) and you've reduced > your php library/binary by 100k. Great, so you have freed 100K in *total*, not per process. Remember that object code resides in read-only/shared pages. The code is loaded to memory only once and shared among all running processes. Thus, removing object code cannot possibly reduce the memory footprint of a large installation in any significant way. > Even so you gain only a 100mb saving (1000 simultaneous apache processes, WOW) According to a poster on new-httpd a few days ago, some people even use 20K Apache children. Although they are unlikely using Apache for serving only dynamic requests. So, if you want to optimize the memory footprint, reduce the size of run-time structures. - Sascha

« previous php.internals (#6918) next »