List Info

Thread: CherryPy performance with mod_wsgi




CherryPy performance with mod_wsgi
country flaguser name
United Kingdom
2007-09-16 15:40:46
I've now been running CherryPy with mod_wsgi on the
live server for a couple of weeks so I thought I'd
report back.

I'm getting about 4 hits per second to Apache/CherryPy
(and many more hits going to a separate server for
static content). The performance is great, with
mod_status showing requests typically being dealt with
between 15 ms and 50 ms.

When I look at 'top' most of the server load is now
from MySQL rather than Apache/CherryPy so it looks
like I've solved the performance problems that I
reported to this list.

I did however have to deploy mod_wsgi in embedded
mode, I found that daemon mode didn't work for me. I
have to admit that I don't really understand the
performance characteristics of threaded Python very
well.

The other issue I had was that I had to remove calls
to random.randint which I was using to select which
advert to display as using Python 2.4 this seemed to
become unreliable when there was multiple requests.

Finally, I've ditched SQLObject in favour of
hand-crafted SQL which has also won me some extra
speed. Although I'm sure that for 99% of applications
SQLObject or similar is a good idea.

I'm sure I'll hit other performance bottlenecks as the
traffic increases this year but for now I'm very happy
with the CherryPy/Cheetah/MySQL/mod_wsgi combination.

A

--~--~---------~--~----~------------~-------~--~----~
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 h
ttp://groups.google.com/group/cherrypy-users?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: CherryPy performance with mod_wsgi
country flaguser name
United States
2007-09-16 18:53:48
On Sep 17, 6:40 am, Andrew Veitch <andrew.vei...yahoo.co.uk> wrote:
> I've now been running CherryPy with mod_wsgi on the
> live server for a couple of weeks so I thought I'd
> report back.
>
> I'm getting about 4 hits per second to Apache/CherryPy
> (and many more hits going to a separate server for
> static content). The performance is great, with
> mod_status showing requests typically being dealt with
> between 15 ms and 50 ms.
>
> When I look at 'top' most of the server load is now
> from MySQL rather than Apache/CherryPy so it looks
> like I've solved the performance problems that I
> reported to this list.
>
> I did however have to deploy mod_wsgi in embedded
> mode, I found that daemon mode didn't work for me. I
> have to admit that I don't really understand the
> performance characteristics of threaded Python very
> well.

Could you perhaps outline what the issues with mod_wsgi
daemon mode
were. Did it simply not work at all, or were you seeing some
requests
failing, or just poor performance? Depending on site load,
behaviour
can also be dictated by how you configured daemon mode.  If
there is a
problem it would be nice to be told so it can be fixed or a
more
suitable configuration suggested.  

Note that there is a known issue which is affecting one user
and which
is still being investigated related to using daemon mode of
mod_wsgi
under a HTTPS site. The person only has the problem when
using Apache
2.2 and it perhaps relates to how their specific SSL
configuration is
done. If you are running a secure site, maybe you are
hitting this as
well. Am waiting on response back as to whether the
workaround fixes
the problem.

Graham


--~--~---------~--~----~------------~-------~--~----~
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 h
ttp://groups.google.com/group/cherrypy-users?hl=en
-~----------~----~----~----~------~----~------~--~---


[1-2]

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