Hi,

I am trying to get some metrics on my installation. For that I have 
disabled the database (db=None) and I am requesting a very simple 
controller:

def hello1():
    return "Hello World"

I have a multi-threaded test program which is sending requests to web2py 
(using WebClient). I have let my test run for several iterations, and I got 
the following metrics:

CLIENTS     ROUNDS ELLAPSED (s)    TOT REQ   AVG (ms)      REQ/s
      8         72     17.969        576     31.197      32.05
      9         25      6.973        225     30.991      32.27
      6          4      0.748         24     31.179      32.07
      7         17      3.645        119     30.634      32.64
      7         58     12.340        406     30.393      32.90
      3         73      6.751        219     30.827      32.44
     10         12      3.399        120     28.329      35.30
      4         32      3.941        128     30.791      32.48
      1         27      0.742         27     27.496      36.37
      8         58     14.156        464     30.508      32.78
      4         31      3.574        124     28.819      34.70
      8         14      3.274        112     29.232      34.21
      9         68     18.722        612     30.591      32.69
      9         81     22.070        729     30.275      33.03
      4         47      6.031        188     32.079      31.17
      7         75     15.491        525     29.506      33.89
      1         90      2.495         90     27.719      36.08
      8         38      9.495        304     31.234      32.02
      2         60      4.000        120     33.335      30.00
      2         81      5.057        162     31.214      32.04

(CLIENTS is the number of active threads, ROUNDS is the number of requests 
that each thread performs)

As you see, I am getting quite stable speed of between 30 and 36 requests/s.
This is fine, but 32 req/s is quite low. My system is (this is my 
development system, an HP 635):

   - web2py 2.0.2
   - 2 cores, AMD E-450 
   - 4 GB RAM
   - Linux 2.6.32-5-686
   - CrunchBang Linux statler
   - Python 2.7.2
   - I am using Rocket
   - No apache (or any other frontend). Directly accessing localhost:8000
   - web2py and my test program are sharing the same machine.

I would like to optimize these parameters before moving to production. Is 
there something obvious that I could try to improve these metrics?
Is 30 req/s an expected value for such a simple test? I expected more than 
100 req/s.

Now that I am writing and thinking about this, I am not even sure if the 
limiting factor is web2py or my test program ... How could I know which 
party is "saturating"?

Thanks,

Daniel

-- 



Reply via email to