There are two issues:

What counts is the number of requests/second. If you have a single
process on a single core, the more concurrent requests , the longer a
request take because the computing time is what it is, unless you
serialize all requests. Yet the max number of requests/second is a
constant and for you it appears to be around 15. If you have a single
process on multiple cores things get worse because of the Python GIL.
If you have multiple cores, make sure you run one Python process per
core. You should be able to do it by configuring apache and will get a
speedup of x[number of processes].

You seem to have ~60-80ms per request. This is high and independent of
the problem above. You less this is an old Intel P4 with  a slow disk
and/or slow memory access, this number should be less than 20ms.

Make sure:
1) enable connection pooling unless you use sqlite
2) set migrate=False, including auth.define_tables(migrate=False)
3) bytecode compile the app (which you did) but bytecode after you
make changes above

What db do you use?

You may want to try benchmark an app without any model and/or a
controller action that returns a string and has no view. It may help
you isolate the problem if any.

Massimo


On Aug 12, 10:13 am, David Marko <[email protected]> wrote:
> And I have just twi tables + web2py auth default models.
>
> Single request is quite fast, this is why my personal feeling from
> app(working with app via browser) is very good. But under the
> preassure speed goes down.
>
> David
>
> On 12 srp, 16:56, mdipierro <[email protected]> wrote:
>
> > Here are the logs for my web server running web2py.com. The log only
> > shows dynamic pages most of which (like the book) use db.
>
> >http://web2py.com/examples/static/logs.txt
>
> > Most pages take around ~20ms but this is a 600MHz VPS with 384MB Ram.
>
> > On Aug 12, 9:48 am, mdipierro <[email protected]> wrote:
>
> > > Something is wrong. In wsgiserver.py set
>
> > > LOGGING = True
>
> > > and look at web2py/httpserver.log
> > > what times do you get?
> > > do you have very large model files?
>
> > > Massimo
>
> > > On Aug 12, 9:43 am, David Marko <[email protected]> wrote:
>
> > > > I just moved my first real-life app into production (its a private app
> > > > so I cant share screens etc.). Its running latest stable web2py on
> > > > Debian 5 + Python 2.6.5 + modwsgi 3.3 . When testing  application home
> > > > page, where are no sql commands, session is disabled (by
> > > > session.forget()) and migration is disabled, I can get, using apache
> > > > benchmark, only 12 req/sec. When I compile app, it increases up to 16
> > > > req/sec, but both numbers seems to me very low. Can you share some
> > > > your experience what one can get from web2py?
>
> > > > Using browser, the application feels very responsive, but I'm just
> > > > scared (a bit) how this will change when all users start using the
> > > > app.
>
> > > > My server HW is one processor 3GHz, 1.5 GB RAM.
>
> > > > David

Reply via email to