[PHP] Re: Re : [PHP] profiler web server

2009-01-27 Thread Jim Lucas
djamel boussebha wrote:
 Hi Jim;
 
 My question is : if you have a server where is installed : apache2 + PHP5 and 
 if you execute of load/stress tests on this server = Except the system 
 resources of the server (CPU, RAM, ..), which are other component to watch 
 (for example the size of the process httpd).
 

Is this a *nix style system?

If so, you can use the top and ps commands to see the various system resources 
in use by different processes.

using top is simple, just type top and look at the SIZE and RES columns.  These 
will tell you how much RAM is being used.

Then using ps I run the following command

ps aux


If you are running windows, then I'm not sure what you can use.

I use a program call Secure Task Manager.  I'm sure there are better programs.  
But have never looked for them.


 Regards;
 
 
 
 
 De : Jim Lucas li...@cmsws.com
 À : soussou97 dbousse...@yahoo.fr
 Cc : php-gene...@lists..php.net
 Envoyé le : Lundi, 26 Janvier 2009, 16h48mn 19s
 Objet : Re: [PHP] profiler web server
 
 soussou97 wrote:
 Hi;

 I have a web server (apache 2.2 + PHP5) which process must be watched for
 measuring the perf ?

 Regards;
 
 All I see here is a statement..  Do you actually have a question for us?
 

-- 
Jim Lucas

   Some men are born to greatness, some achieve greatness,
   and some have greatness thrust upon them.

Twelfth Night, Act II, Scene V
by William Shakespeare

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] profiler web server

2009-01-26 Thread Jim Lucas
soussou97 wrote:
 Hi;
 
 I have a web server (apache 2.2 + PHP5) which process must be watched for
 measuring the perf ?
 
 Regards;

All I see here is a statement.  Do you actually have a question for us?

-- 
Jim Lucas

   Some men are born to greatness, some achieve greatness,
   and some have greatness thrust upon them.

Twelfth Night, Act II, Scene V
by William Shakespeare

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] profiler web server

2009-01-26 Thread Boyd, Todd M.
 -Original Message-
 From: Jim Lucas [mailto:li...@cmsws.com]
 Sent: Monday, January 26, 2009 9:48 AM
 To: soussou97
 Cc: php-general@lists.php.net
 Subject: Re: [PHP] profiler web server
 
 soussou97 wrote:
  Hi;
 
  I have a web server (apache 2.2 + PHP5) which process must be
watched
 for
  measuring the perf ?
 
  Regards;
 
 All I see here is a statement.  Do you actually have a question for
us?

Statements do not end with question marks... He is asking a question.

It looks to me like he wants to know which process he should watch to
determine the performance of Apache v2.2.

I believe it's httpd.

HTH,


// Todd

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] profiler web server

2009-01-26 Thread Michael Kubler
If you want to profile your web server, i.e artificially see what it's 
like under load, then you can use a program like 'ab' on Linux which 
will create the specified number of HTTP requests as if the URL was 
being requested (although not all the other things like the images, .css 
files, etc..)


An example command might be *ab -n 1 -c 50 http://localhost/*;, 
although you'll want to check the options first.
You'll probably also want to use something like htop (or at least top) 
to view the current load on the server, and how many apache threads are 
spawned.
Ohh and I'd suggest backing up or clearing the log file before and after 
(depends if you keep the log file or not).


I just tried myself, and on my un-optimised backup server at home it 
responds to 150 concurrent connections faster then 500 concurrent 
connections mainly because it has to spawn so many children as it ramps up.


Actually if the OP wants a proper answer we will need more detail, like 
the operating system or distro. I know on Ubuntu it's simply seen as 
apache2, and ps shows it as '/usr/sbin/apache2'


Also, if you want to know how many threads are running this command 
works for me :

 ps augx | grep apache | wc -l

Sorry, I know this isn't directly PHP specific,although this sort of 
thing  can be useful when testing various scripts, and comparing an 
internal looping test in PHP to time an algorithm, and actually running 
the script say 10,000 times. Also good for making sure your site can 
survive a slashdot (it turns out that without some tweaking of apache 
mine can't).


Michael Kubler
*G*rey *P*hoenix *P*roductions http://www.greyphoenix.biz



Boyd, Todd M. wrote:

Statements do not end with question marks... He is asking a question.

It looks to me like he wants to know which process he should watch to
determine the performance of Apache v2.2.

I believe it's httpd.

HTH,


// Todd