List Info

Thread: How to run benchmark.py for cherrypy http server?




How to run benchmark.py for cherrypy http server?
user name
2006-12-28 23:00:26
Hi:
In folder cherrypy/test (for cp3.0 and py25), we have the
python script
"benchmark.py."
Is there a way to test the performance of cherrypy http
server instead
of the apache one?
I executed the next:

python benchmark.py
.......................and got next output:
Starting CherryPy app server...
Started in 1.21799993515 seconds

Client Thread Report (1000 requests, 14 byte response body,
10 server
threads):

but then it hangs and I can not get the numerical results;
when I go to
IE browser and type the address http://localhost:8080/,
error "the page
cannot be displayed" issues.
What am i doing wrong?
Regards.


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the
Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-usersgooglegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribegooglegroups.com
For more options, visit this group at http://groups-beta.google.com/group/cherrypy-users?hl=en

-~----------~----~----~----~------~----~------~--~---

How to run benchmark.py for cherrypy http server?
user name
2006-12-28 23:47:15
vizcayno wrote:
> In folder cherrypy/test (for cp3.0 and py25), we have
the python script
> "benchmark.py."
> Is there a way to test the performance of cherrypy http
server instead
> of the apache one?

Er... by default, you are testing the CherryPy HTTP server.
There's a
command-line flag to test the Apache server.

But more importantly, you must have the "ab" tool
from Apache
installed. This is used on the client side to do the
testing.

> I executed the next:
>
> python benchmark.py
> .......................and got next output:
> Starting CherryPy app server...
> Started in 1.21799993515 seconds
>
> Client Thread Report (1000 requests, 14 byte response
body, 10 server
> threads):
>
> but then it hangs and I can not get the numerical
results; when I go to
> IE browser and type the address http://localhost:8080/,
error "the page
> cannot be displayed" issues.

It really hangs? Or just exits? If you don't have
"ab" installed, it
just exits (it shouldn't, but it does at the moment--I'm
working on a
fix).


Robert Brewer
System Architect
Amor Ministries
fumanchuamor.org


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the
Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-usersgooglegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribegooglegroups.com
For more options, visit this group at http://groups-beta.google.com/group/cherrypy-users?hl=en

-~----------~----~----~----~------~----~------~--~---

How to run benchmark.py for cherrypy http server?
user name
2006-12-29 00:36:03
Robert:
Thanks for your attention, time and your guidelines.
I am working on WIN XP SP2. From the cmd.exe I invoke
benchmark.py and
it does not exit, it hangs; i.e. when I press CTRL-C
(e.g.after 15
minutes) it does not respond, I must close the cmd.exe
window to finish
all. I repeated this action many times with the same result,
I also
rebooted my machine.
I did an experiment, I ran ORACLE Express browser which uses
the same
port (8080); when the port is used by another application
and I execute
benchmark.py, after a few seconds or when I press CTRL-C,
the program
exits:
    % cd C:Python25Libsite-packagescherrypytest
    % python benchmark.py
    Starting CherryPy app server...
    %

Incidentally, I did not understand well about
"ab", Should I install it
despite  I am not using Apache for the test?
Thanks again.

Vizcayno


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the
Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-usersgooglegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribegooglegroups.com
For more options, visit this group at http://groups-beta.google.com/group/cherrypy-users?hl=en

-~----------~----~----~----~------~----~------~--~---

How to run benchmark.py for cherrypy http server?
user name
2006-12-29 01:52:26
Robert:
I got "ab" program from Apache site (my intention
was never to use
Apache so, I beg your pardon if I get confussed with the
command) and
ran it in one cmd.exe session; previously I executed
benchmark.py on a
second cmd.exe session. I show you the results:

benchmark.py
==========
.cd C:Python25Libsite-packagescherrypytest

.python benchmark.py
Starting CherryPy app server...
Started in 1.14100003242 seconds

Client Thread Report (1000 requests, 14 byte response body,
10 server
threads):

threads | Completed | Failed | req/sec | msec/req | KB/sec |
     10 |      1000 |      0 |  421.05 |    2.375 |  66.95 |
     20 |      1000 |      0 |  415.58 |    2.406 |  66.08 |
     30 |      1000 |      0 |  407.64 |    2.453 |  64.82 |
     40 |      1000 |      0 |  349.73 |    2.859 |  55.61 |
     50 |      1000 |      0 |  402.52 |    2.484 |  64.00 |

Client Thread Report (1000 requests, 14 bytes via staticdir,
10 server
threads):


threads | Completed | Failed | req/sec | msec/req | KB/sec |
     10 |      1000 |      0 |  280.70 |    3.563 |  57.54 |
     20 |      1000 |      0 |  290.91 |    3.438 |  59.35 |
     30 |      1000 |      0 |  285.71 |    3.500 |  58.29 |
     40 |      1000 |      0 |  288.29 |    3.469 |  58.81 |
     50 |      1000 |      0 |  259.11 |    3.859 |  52.86 |

Size Report (1000 requests, 50 client threads, 10 server
threads):

    bytes | Completed | Failed | req/sec | msec/req |  
KB/sec |
       10 |      1000 |      0 |  338.62 |    2.953 |   
52.49 |
      100 |      1000 |      0 |  335.08 |    2.984 |   
81.76 |
     1000 |      1000 |      0 |  290.91 |    3.438 |  
326.98 |
    10000 |      1000 |      0 |  304.76 |    3.281 | 
3021.41 |
   100000 |      1000 |      0 |  181.82 |    5.500 |
17782.73 |
100000000 |      1000 |      1 |  112.87 |    8.859 |
11094.46 |


ab.exe
=====
.ab.exe -n 1000 http://localhost:8080/
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146
$> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd,
http://www.zeustech.net/
Copyright 2006 The Apache Software Foundation, http://www.apache.org/

Benchmarking localhost (be patient)
apr_socket_recv: An existing connection was forcibly closed
by the
remote host.
  (730054)
Total of 96 requests completed

.ab.exe -n 1000 http://localhost:8080/
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146
$> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd,
http://www.zeustech.net/
Copyright 2006 The Apache Software Foundation, http://www.apache.org/

Benchmarking localhost (be patient)
apr_socket_recv: An existing connection was forcibly closed
by the
remote host.
  (730054)

.ab.exe -n 1000 http://localhost:8080/
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146
$> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd,
http://www.zeustech.net/
Copyright 2006 The Apache Software Foundation, http://www.apache.org/

Benchmarking localhost (be patient)
Completed 100 requests
apr_socket_recv: An existing connection was forcibly closed
by the
remote host.
  (730054)
Total of 136 requests completed

.ab.exe -n 1000 http://localhost:8080/
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146
$> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd,
http://www.zeustech.net/
Copyright 2006 The Apache Software Foundation, http://www.apache.org/

Benchmarking localhost (be patient)
Completed 100 requests
Completed 200 requests
apr_socket_recv: An existing connection was forcibly closed
by the
remote host.
  (730054)
Total of 234 requests completed

.ab.exe -n 1000 http://localhost:8080/
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146
$> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd,
http://www.zeustech.net/
Copyright 2006 The Apache Software Foundation, http://www.apache.org/

Benchmarking localhost (be patient)
apr_socket_recv: An existing connection was forcibly closed
by the
remote host.
  (730054)

.ab.exe -n 1000 http://localhost:8080/
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146
$> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd,
http://www.zeustech.net/
Copyright 2006 The Apache Software Foundation, http://www.apache.org/

Benchmarking localhost (be patient)

Test aborted after 10 failures

apr_socket_connect(): No connection could be made because
the target
machine act
ively refused it.   (730061)

Conclusions:
-----------------
-Benchmark.py continues hung but shows the results I
attached.
-Sometimes ab.exe terminates normally but after a few new
attempts
generates the same error message: apr_socket_connect(): No
connection
could be made because the target machine actively refused
it.
(730061).
-Web page http://localhost:8080/
continues showing the msg "Internet
Explorer cannot display the webpage".

What do you think is happening?
Thanks again.


Thanks again.


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the
Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-usersgooglegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribegooglegroups.com
For more options, visit this group at http://groups-beta.google.com/group/cherrypy-users?hl=en

-~----------~----~----~----~------~----~------~--~---

[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )