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
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
I'm sorry I didn't word my last mail very well. I
meant that the performance in embedded mode was better
than the performance in daemon mode however in both
cases it was a big improvement over the previous
mod_rewrite.
A