Re: [PHP] memory usage/release & GC

2010-12-31 Thread Tommy Pham
On Fri, Dec 31, 2010 at 2:02 AM, Peter Lind wrote: > > On Dec 31, 2010 6:20 AM, "Tommy Pham" wrote: >> >> Hi folks, >> >> With the recent thread about password & security, I wrote a small quick >> script to generate a random or all possible passwords based on certain >> parameters for a brute for

Re: [PHP] memory usage/release & GC

2010-12-31 Thread Peter Lind
On Dec 31, 2010 6:20 AM, "Tommy Pham" wrote: > > Hi folks, > > With the recent thread about password & security, I wrote a small quick > script to generate a random or all possible passwords based on certain > parameters for a brute force use. On a very long running execution for a > complex pass

[PHP] memory usage/release & GC

2010-12-30 Thread Tommy Pham
Hi folks, With the recent thread about password & security, I wrote a small quick script to generate a random or all possible passwords based on certain parameters for a brute force use. On a very long running execution for a complex password in length with full use of the keys (94 characters), i

RES: [PHP] Memory usage very high under AMD64?

2008-04-03 Thread Thiago Pojda
: Re: [PHP] Memory usage very high under AMD64? Aschwin Wesselius wrote: > Ed W wrote: >> RSS is staying approximately constant, ie the memory in use has not >> changed much >> >> VSZ, ie virtual memory has increased by more than 2x2=4. If someone >> has some

Re: [PHP] Memory usage very high under AMD64?

2008-04-03 Thread Ed W
Aschwin Wesselius wrote: Ed W wrote: RSS is staying approximately constant, ie the memory in use has not changed much VSZ, ie virtual memory has increased by more than 2x2=4. If someone has some hard experience of both platforms then please add some experience to this - however, I'm looking

Re: [PHP] Memory usage very high under AMD64?

2008-04-03 Thread Aschwin Wesselius
Ed W wrote: RSS is staying approximately constant, ie the memory in use has not changed much VSZ, ie virtual memory has increased by more than 2x2=4. If someone has some hard experience of both platforms then please add some experience to this - however, I'm looking for some hard debugging

Re: [PHP] Memory usage very high under AMD64?

2008-04-03 Thread Ed W
Aschwin Wesselius wrote: Ed W wrote: 45MB x2 is a lot less than 215MB... Also, I would expect the actual consumption to be less than 2x since not all the data will be doubled in size..? Any other suggestions on how to debug this 5x jump in memory usage? Thanks Ed W Robert Cummings wrote:

Re: [PHP] Memory usage very high under AMD64?

2008-04-03 Thread Aschwin Wesselius
Ed W wrote: 45MB x2 is a lot less than 215MB... Also, I would expect the actual consumption to be less than 2x since not all the data will be doubled in size..? Any other suggestions on how to debug this 5x jump in memory usage? Thanks Ed W Robert Cummings wrote: 64 bit integers are twic

Re: [PHP] Memory usage very high under AMD64?

2008-04-02 Thread Ed W
45MB x2 is a lot less than 215MB... Also, I would expect the actual consumption to be less than 2x since not all the data will be doubled in size..? Any other suggestions on how to debug this 5x jump in memory usage? Thanks Ed W Robert Cummings wrote: 64 bit integers are twice as big as 3

Re: [PHP] Memory usage very high under AMD64?

2008-04-02 Thread Robert Cummings
64 bit integers are twice as big as 32 bit integers. Cheers, Rob. On Wed, 2008-04-02 at 20:16 +0100, Ed W wrote: > Hi > > I am trying to figure out expected memory usage of PHP > > Under my 32bit install Apache 2 processes are drawing around 45MB > virtual and 25MB RSS. (XCache enabled) > > H

[PHP] Memory usage very high under AMD64?

2008-04-02 Thread Ed W
Hi I am trying to figure out expected memory usage of PHP Under my 32bit install Apache 2 processes are drawing around 45MB virtual and 25MB RSS. (XCache enabled) However, under 64bit, same PHP and Apache versions, FastCGI is consuming around 110MB virt and 25MB RSS. However, Apache2 processes

[PHP] Memory Usage

2004-10-04 Thread Juan Pablo Herrera
Hi! I need management the use of the memory when a php script is execute. How can i do it?.I know mysql_free_result for free all memory associated with the result, is it all?. Regards, JP -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Memory usage

2004-05-12 Thread Curt Zirzow
* Thus wrote Oliver Hankeln ([EMAIL PROTECTED]): > Hi! > > I get memory exceded errors and want to find out why. So I am looking > for a way to determine how much memory is currently beeing used by my > script. Is this possible? > getPID + reading from /proc dosent work because php is an apache

[PHP] Memory usage

2004-05-12 Thread Oliver Hankeln
Hi! I get memory exceded errors and want to find out why. So I am looking for a way to determine how much memory is currently beeing used by my script. Is this possible? getPID + reading from /proc dosent work because php is an apache module. (I can“t change this) Thanks! -- PHP General Maili

Re: [PHP] Memory usage of variables in Functions/Methods

2003-10-07 Thread Gerard Samuel
Robert Cummings wrote: On Tue, 2003-10-07 at 22:44, Gerard Samuel wrote: The question is what happens to local variables when the code leaves a function/method as far as memory is concerned. Does it *silently* unset (free the allocated memory) the local variables, or does it make sense to har

Re: [PHP] Memory usage of variables in Functions/Methods

2003-10-07 Thread Robert Cummings
On Tue, 2003-10-07 at 22:44, Gerard Samuel wrote: > The question is what happens to local variables when the code leaves a > function/method > as far as memory is concerned. > Does it *silently* unset (free the allocated memory) the local > variables, or does it make sense to hardcode > unset() t

[PHP] Memory usage of variables in Functions/Methods

2003-10-07 Thread Gerard Samuel
The question is what happens to local variables when the code leaves a function/method as far as memory is concerned. Does it *silently* unset (free the allocated memory) the local variables, or does it make sense to hardcode unset() to garbage these local variables? Thanks function foo() { $

Re: [PHP] Re: PHP memory usage

2003-01-03 Thread Rick Widmer
At 01:25 AM 1/3/03 -0200, Fernando Serboncini wrote: function a(myclass c) { return c; } would create another copy of "c" in memory. Things get a bit larger when you go with linked-list like structures in classes, where you have to take really good care to don't duplicate data. If you're no

Re: [PHP] PHP memory usage

2003-01-02 Thread James H. Thompson
> On Friday 03 January 2003 05:54 am, James H. Thompson wrote: > > We have a good size PHP libary -- about 370KB of source code. > > Its one class with a multitude of small functions in it. > > that's a huge class. is it feasible to split it into smaller classes that > do smaller things? Its sp

[PHP] Re: PHP memory usage

2003-01-02 Thread Fernando Serboncini
I don't know if I'm talking bullshit, but don't forget that each parameter or return valeu in php, if not explicited as a pointer, it's a copy of the full parameter. This way, any function a(myclass c) { return c; } would create another copy of "c" in memory. Things get a bit larger when you

Re: [PHP] PHP memory usage

2003-01-02 Thread Gerald Timothy Quimpo
On Friday 03 January 2003 05:54 am, James H. Thompson wrote: > We have a good size PHP libary -- about 370KB of source code. > Its one class with a multitude of small functions in it. that's a huge class. is it feasible to split it into smaller classes that do smaller things? i only ask. i have

[PHP] PHP memory usage

2003-01-02 Thread James H. Thompson
We have a good size PHP libary -- about 370KB of source code. Its one class with a multitude of small functions in it. just doing a require_once() on this library appears to use about 5MB of memory.(the change in VmSize in /proc/self/status) Is this a normal ratio of PHP source code size to execu

[PHP] Memory usage - calculating

2002-09-13 Thread Konstantin Tjuterev
Hello! Does anybody know the way to calculate exactly memory usage of PHP script, especially the code part of it and to get any ideas which part of it is taking the memory ? For approximate calculation of data part I'm using the following: function mem_size(&$var) { $s_var = serialize($var);

[PHP] Memory usage with Apache

2002-01-23 Thread Thomas E. Ruth
Hello, I'm using PHP 4.0.4pl1 with Apache 1.3.14. I have a PHP script that accumulates data for insertion into a database. This script runs in peices and unset()'s variables that contain the data periodically in hopes of freeing memory for the next batch of records. Apparently it's not working t

Re: [PHP] Memory usage question

2001-07-12 Thread jeremy brand
> Is there a way that I can reduce the memory usage of PHP4? Also, is it a > good idea to configure a separate Apache that has PHP4 enabled and use it > on only the PHP4 sites on the server, while the normal Apache has PHP4 > disabled and serves the non-PHP4 sites? Hi Philip, It's probably your

[PHP] Memory usage question

2001-07-12 Thread Philip Mak
My machine is running out of memory (256 MB; upgrading is not an option at this point). Each httpd process is taking up 8 MB of memory (4 MB shared). PHP4 is responsible for about 3.5 MB of that. Is there a way that I can reduce the memory usage of PHP4? Also, is it a good idea to configure a se