home     documentation     download     Spyce logo

Documentation - Performance

Prev: 4 - Addenda Up: 4 - Addenda Next: 4.2 - History

4.1. Performance

Although flexibility usually outweighs raw performance in the choice of technology, it is nice to know that the technology that you have chosen is not a resource hog, and can scale to large production sites. The current Spyce implementation is comparable to its cousin technologies: JSP, PHP and ASP. We ran a micro-benchmark using hello.spy and equivalents. All benchmark files are available in the misc/benchmark directory.

<spy:parent title="Hello" />
[[ import spyce ]]

Hello from Spyce version 
[[= spyce.__version__ ]]!
Run this code

Spyce was measured under CGI, FCGI, mod_python and proxy configurations. For calibration the static HTML, CGI-C, CGI-Python and FCGI-Python tests were performed. In the case of CGI-C, the request is handled by a compiled C program with the appropriate printf statements. In the case of CGI-Python, we have an executable Python script with the appropriate print statements. FCGI-Python is a similar script that is FCGI enabled. ASP was measured on a different machine, only to satisfy curiosity; those results are omitted.

Configuration Hello world!
Spyce-modpython 250
modpython publisher 300
Spyce-proxy 200
JSP 100
PHP 450
Spyce-FCGI 100
Python-FCGI 140
Spyce-CGI 8
Python-CGI 25
C-CGI 180
Static HTML 1500

The throughput results (shown above in requests per second) were measured on a Intel PIII 700MHz, with 128 MB of RAM and a 512 KB cache running RedHat Linux 7.2 (2.4.7-10 kernel), Apache 1.3.22 and Python 2.2 using loopback (http://localhost/...) requests. Since each of the script languages requires an initial compilation phase (of which JSP seems the longest), the server was warmed up with 100 requests before executing 1000 measured requests with a concurrency level of 3, using the ab (Apache benchmark) tool. Figures are rounded to the nearest 25 requests/second.

Conclusion:All spyce configuration options except CGI can handle large websites, as the Spyce engine and cache persist between requests. The CGI version takes a hit in recompiling Spyce files on every request. (This may be alleviated using a disk-based Spyce cache (as opposed to the current memory-based implementation).)

Prev: 4 - Addenda Up: 4 - Addenda Next: 4.2 - History

Spyce logo
Python Server Pages
version 2.1.3
Spyce Powered SourceForge Logo