I tried your script and couldn't reproduce such big numbers.
     Plus the memory usage leveled to 54152 bytes after some requests
     to each apache child. This was with using the latest CVS checkout
     of PHP 5.
     
     --Jani
     

On Thu, 8 Jan 2004, Armel FAUVEAU wrote:

>Hi all,
>
>I wanted to compare the memory usage of PHP4 and PHP5 (Beta 3) on a same
>script. And i observed a strange problem.
>
>So, here is a small test (if you want to reproduce it).
>
>First, i write a small and short php script.
>It just make a simple memory_get_usage() (with a number_format for the
>presentation :p) :
>
><?php
>print number_format(memory_get_usage(), 0, ',', ' ').' bytes';
>?>
>
>Second, i write a small shell script to call 100 times my php script by
>HTTP. I used lynx. And i stored the result in a logfile. Here is the code :
>
>#!/bin/sh
>for (( i = 1; i <= 100; i++ )); do
>        lynx -dump http://localhost/armel/mem.php >> php.log
>done
>
>And here is the result...
>
>----------------------------------------------------
>With PHP4.3.4 (axps module) :
>
>[EMAIL PROTECTED]:~$ cat php.log
>   27 232 bytes
>
>   27 232 bytes
>...
>...
>   27 232 bytes
>
>   27 232 bytes
>----------------------------------------------------
>With PHP5 Beta3 (apxs module too) :
>
>[EMAIL PROTECTED]:~$ cat php.log
>   211 952 bytes
>
>   153 784 bytes
>
>   108 184 bytes
>
>   157 680 bytes
>
>   94 376 bytes
>
>   107 392 bytes
>
>   446 888 bytes
>
>   558 712 bytes
>...
>...
>   107 392 bytes
>
>   446 888 bytes
>
>   557 656 bytes
>
>   211 952 bytes
>
>   153 784 bytes
>
>   108 184 bytes
>
>   157 680 bytes
>----------------------------------------------------
>
>The result under PHP4 is logical. But under PHP5 Beta 3, i think it's very
>very strange. What do you think about this ? Any idea ? Maybe my script can
>even be a good system of random pulling :))
>
>Regards (and happy new year),
>
>Armel.
>
>

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to