1. See also
2. Benchmarking
2.1. Benchmark discussion
- CPU usage alone is not that interesting (is high or low CPU usage good?). Interesting would be CPU usage/(requests/s) or better CPU time per request.
- Twisted uses a single python process with multiple threads. As python can't use SMP, it can at best reach about half of the performance a SMP-using server could. You can make usage of SMP if you run multiple python processes (== multiple wikis) with Twisted.
- yes, the bench comparison between Twisted and FastCGI is unfair. Twisted should be able to handle at least double the requests per second on the dual processor server used to test.
- comparing load an processes served, it seems logical that Twisted has a much higher potential. Keep in mind that none of the servers used where tuned for this test! Getting the Twisted server to create more threads for its pool could change much.
Who wants to tune it? Even more than a year after those benchmarks, Twisted is the slowest server
3. Conclusions
we strongly recommend to use python >=2.3!
- don't try to use pure cgi if you want performance!
- this chart is based on the assumption that apache is used as a base server for CGI, FastCGI, and mod_python
Features |
CGI |
Standalone |
FastCGI |
Twisted |
mod_python |
Performance |
slow |
very fast |
very fast |
fast |
fast |
Standalone |
no |
yes |
no |
yes |
no |
Long-Running |
no |
yes |
yes |
yes |
yes |
Multimethod |
none |
Threads |
threads/forks |
threads |
threads/forks1 |
Farming |
yes |
yes |
yes |
yes |
yes |
Setup |
easy |
easy |
difficult2 |
moderate |
moderate |
add more... |
|
|
|
|
|
finish this comparison! put this on a seperate page?
4. Proposals
- No performance regressions for CGI that can be avoided by sensible design.