Re: [PHP-DEV] RE: PHP 4.0 Bug #10299 Updated: CPU and Memory Spike

2001-04-15 Thread Goten

That's my whole point.  PHP should be able handle it pretty well.  But 
Chris Adams said my setup can only support 10 concurrent 
connections.  That's why I am curious what is wrong here.

I am pretty sure PHP can handle the load, but somehow something trigger the 
CPU spike.  I just can't find out why.

rgd,
Derek


-Original Message-
From: Derick Rethans
To: Derek Leung
Cc: '[EMAIL PROTECTED]'
Sent: 4/15/01 9:34 AM
Subject: Re: [PHP-DEV] RE: PHP 4.0 Bug #10299 Updated: CPU and Memory Spike

On Sun, 15 Apr 2001, Derek Leung wrote:

 > I did try the snap shot 4/14/2001 4.06dev, it didnt' solve the
problem.
 >
 > If 256mb ram , dual 400mhz can only serve around 10 concurrent
clients, this
 > is a MAJOR issue for PHP.  I guess any web language like PERL, Cold
fusion,
 > JSP, servlet can do a LOT more than this with the equipment I am using
right
 > now.

Well, my Pentium 133 with 48MB's of RAM even gets around 25 concurrent
connections...


Derick Rethans


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] RE: PHP 4.0 Bug #10299 Updated: CPU and Memory Spike

2001-04-15 Thread Derick Rethans

On Sun, 15 Apr 2001, Derek Leung wrote:

> I did try the snap shot 4/14/2001 4.06dev, it didnt' solve the problem.
>
> If 256mb ram , dual 400mhz can only serve around 10 concurrent clients, this
> is a MAJOR issue for PHP.  I guess any web language like PERL, Cold fusion,
> JSP, servlet can do a LOT more than this with the equipment I am using right
> now.

Well, my Pentium 133 with 48MB's of RAM even gets around 25 concurrent
connections...


Derick Rethans

-
PHP: Scripting the Web - www.php.net - [EMAIL PROTECTED]
 SRM: Site Resource Manager - www.vl-srm.net
-


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] RE: PHP 4.0 Bug #10299 Updated: CPU and Memory Spike

2001-04-14 Thread Chris Adams

On 14 Apr 2001 20:14:53 -0700, Dan Anderson <[EMAIL PROTECTED]> wrote:
>> 256meg is good for upto about 10 concurrent clients, much more and the
>> server starts to grind, i have 192meg in a box that serves
>> 5000pages/day.
>>
>
>Is this the consensus of the list?  Is PHP THIS much of a hog?  I can't
>really believe this

It's not even remotely true unless you're running PHP as a CGI and using some
particularly resource-intensive code. For reference, I have a development
system with a 500Mhz Athlon and 320MB. This is not a tuned system - somewhat
the opposite, in fact. I have code which queries MySQL to generate some XML and
then uses XSLT to turn it into HTML - this sustains somewhere around 45 hits /
second with 50 simultaneous clients; simple scripts hit ~155 hits / second.

If you were to create a tuned PHP build and run it with a tuned Apache / MySQL
using one of the script caches (Zend, APC, BWare) these numbers would go up
substantially.

Chris

Chris

-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] RE: PHP 4.0 Bug #10299 Updated: CPU and Memory Spike

2001-04-14 Thread Goten

So, I am wondering what will cause the CPU and memory spike?  As I said in 
my previous mesg, include a lot of files and keep reloading the page will 
get the CPU idle time to 0% and then the httpd process hang.


-Original Message-
From: Chris Adams
To: Derek Leung
Sent: 4/15/01 3:21 AM
Subject: Re: [PHP-DEV] RE: PHP 4.0 Bug #10299 Updated: CPU and Memory Spike

In php.dev, you wrote:
 >I did try the snap shot 4/14/2001 4.06dev, it didnt' solve the problem.
 >
 >If 256mb ram , dual 400mhz can only serve around 10 concurrent clients,
this
 >is a MAJOR issue for PHP.  I guess any web language like PERL, Cold
fusion,
 >JSP, servlet can do a LOT more than this with the equipment I am using
right
 >now.

You'd guess wrong. Cold Fusion and, to a lesser degree, Java can't
deliver
anywhere near the performance PHP does (benchmarks on projects I've done
have
had CF at anywhere from 25%-1000% slower than PHP depending on the
operation),
particularly in only 256MB.

Whatever your problem is, it's not intrinsic to PHP. With a single
500Mhz
processor and 320MB of RAM, I have no problem delivering 40-50 hits /
second
sustained with 50 simultaneous clients on pages which are doing MySQL
queries,
returning the results as XML and converting them into HTML with XSLT.
For
simple scripts, that heads north of 360 hits / second.

Note that this is on an unoptimized development system. With a
performance
tuned apache, PHP and MySQL installation and the use of one of the PHP
script
caches, performance usually goes up by at least a factor 3 or so.

Chris


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] RE: PHP 4.0 Bug #10299 Updated: CPU and Memory Spike

2001-04-14 Thread Dan Anderson

> I did try the snap shot 4/14/2001 4.06dev, it didnt' solve the problem.
>
> If 256mb ram , dual 400mhz can only serve around 10 concurrent clients,
this
> is a MAJOR issue for PHP.  I guess any web language like PERL, Cold
fusion,
> JSP, servlet can do a LOT more than this with the equipment I am using
right
> now.
>
> 3. more ram
>
> 256meg is good for upto about 10 concurrent clients, much more and the
> server starts to grind, i have 192meg in a box that serves
> 5000pages/day.
>

Is this the consensus of the list?  Is PHP THIS much of a hog?  I can't
really believe this

Dan


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] RE: PHP 4.0 Bug #10299 Updated: CPU and Memory Spike

2001-04-14 Thread Derek Leung

I did try the snap shot 4/14/2001 4.06dev, it didnt' solve the problem.

If 256mb ram , dual 400mhz can only serve around 10 concurrent clients, this
is a MAJOR issue for PHP.  I guess any web language like PERL, Cold fusion,
JSP, servlet can do a LOT more than this with the equipment I am using right
now. 

-Original Message-
From: Cameron
To: [EMAIL PROTECTED]
Sent: 4/14/01 12:45 PM
Subject: PHP 4.0 Bug #10299 Updated: CPU and Memory Spike

my suggestions

1. update to latest php snap from http://snaps.php.net/

they are "beta" but generally run better than the current release.

2. set your max execution time

change it to as close to possible to the max time any script would
really take, generally something around 3 seconds

3. more ram

256meg is good for upto about 10 concurrent clients, much more and the
server starts to grind, i have 192meg in a box that serves
5000pages/day.

4. try some caching?

http://apc.communityconnect.com/

try it out, it helped me a bit with making a server go a bit faster,
dont use the SHM version with that little ram tho, use the MMAP version.


Cameron Brunner
Senior Web Programmer
inetsalestech.com

[EMAIL PROTECTED] wrote:

> ID: 10299
> User Update by: [EMAIL PROTECTED]
> Status: Open
> Bug Type: Performance problem
> Description: CPU and Memory Spike
>
> This is vmstat show if I keep reloading the script
>
> procs  memory pagedisks faults
cpu
>  r b w avm   fre  flt  re  pi  po  fr  sr da0 da1   in   sy  cs us
sy id
>  1 4 0   73860 134324   0   0   0   0   0   2   0  382 3804 258 16
1 83
>  0 4 0   73860 134244   0   0   0   0   0   0   0  357 3789 245 15
4 81
>  1 4 0   73860 134244   0   0   0   0   0   0   0  373 3763 263 14
3 83
>  2 4 0   73860 13416  142   0   0   0 139   0   0   0  402 6155 285 26
4 70
>  0 4 0   73860 134084   0   0   0   4   0  11   0  366 3179 220 11
2 87
>  1 4 0   73860 134004   0   0   0   0   0   0   0  358 3943 257 15
3 82
>  2 4 0   73860 134004   0   0   0   0   0   0   0  340 4201 240 12
42 45
>  2 4 0   73860 134004   0   0   0   0   0   0   0  240 1842  90  0
100  0
>  2 4 0   73116 134004   0   0   0   0   0  19   0  265 1802  98  0
100  0
>  2 4 0   73116 134004   0   0   0   0   0   0   0  241 1753  93  0
100  0
>  2 4 0   73116 134004   0   0   0   0   0   0   0  239 1729  96  0
100  0
>  2 4 0   73116 134004   0   0   0   0   0   0   0  241 1612  94  0
100  0
>  2 4 0   73116 134004   0   0   0   0   0   0   0  243 1576  97  0
100  0
>  2 4 0   73116 134004   0   0   0   0   0   0   0  243 1541  98  0
100  0
>  2 4 0   73116 134004   0   0   0   0   0   0   0  239 1487 102  0
100  0
>  2 4 0   73116 134004   0   0   0   0   0   0   0  241 1401  93  0
100  0
>  2 4 0   73116 134004   0   0   0   0   0   0   0  251 1405 100  0
100  0
>  2 4 0   73116 134004   0   0   0   0   0   0   0  246 1338 101  0
100  0
>  2 4 0   73116 134004   0   0   0   0   0   0   0  238 1297  94  0
100  0
>  2 4 0   73860 134004   0   0   0   0   0   0   2  243 1282 100  0
100  0
>  2 4 0   73860 134004   0   0   0   0   0   0   0  239 1223  89  0
100  0
>  2 4 0   73860 134004   0   0   0   2   0   9  16  300 1180  92  0
100  0
>  procs  memory pagedisks faults
cpu
>  r b w avm   fre  flt  re  pi  po  fr  sr da0 da1   in   sy  cs us
sy id
>  3 4 0   73860 134004   0   0   0   0   0   0   0  251 1156  90  0
100  0
>  3 4 0   50296 134004   0   0   0   0   0   6   0  258 1116  93  0
100  0
>  2 4 0   50296 134004   0   0   0   0   0   0   0  240 1108  83  0
100  0
>  3 4 0   50296 134004   0   0   0   0   0   0   0  245 1064  92  0
100  0
>  3 4 0   46988 134004   0   0   0   0   0   0   0  242 1031  83  0
100  0
>  3 4 0   46988 134004   0   0   0   0   0   0   0  242  989  82  0
100  0
>  2 4 0   46988 134004   0   0   0   0   0   0   0  243 1010  85  0
100  0
>  2 4 0   46988 134004   0   0   0   0   0   1   0  241  985  81  0
100  0
>  2 4 0   46988 134004   0   0   0   0   0   0   0  241  971  89  1
99  0
>  2 4 0   46988 134004   0   0   0   0   0   0   0  243  940  74  0
100  0
>  3 4 0   46988 134004   0   0   0   2   0   8   0  250  926  80  0
100  0
>  2 4 0   46988 134004   0   0   0   0   0   1   0  245  930  88  0
100  0
>  3 4 0   46988 134004   0   0   0   0   0   0   0  240  905  80  0
100  0
>  2 4 0   46988 134004   0   0   0   0   0   7   0  253  920 100  0
98  2
>  3 4 0   47332 13056   90   0   0   0   0   0   0   0  239 2113 116  3
97  0
>  2 4 0   46588 130484   0   0   0   0   0   1   0  243 2334 103  1
99  0
>  1 4 0   46244 133924   0   0   0  86   0   8   0  276 4383 140  7
19 74
>  1 4 0   47896 13184   59   0   0   0   0   0   2   0  275  621  56  7
1 92
>  0 4 0   47896 13152   20   0   0   0   0   0   1   0  253  471  46  6
1 93
>  1 4 0   47492 13372   18   0   0   0  64   0   0   0  251  478