Django FCGI Stress Test, part 2 01.04.2007
See also: Part 1 of the stress test
Something I didn’t notice when I ran the stress test yesterday was this:
Transactions: 1000 hits
Successful transactions: 713
This meant that although no visits timed out, there were a little under 300 requests that got returned either an error, and not a
200 success code.
This was probably because I only had a single FCGI listener.
I’ve since changed it so that I have four FCGI processes running — on unix sockets rather than TCP sockets. I’ve set up nginx to load balance between the four python processes. And then I ran the stress test again.
# siege -d1 -r10 -c100 nodnod.net ** siege 2.65 ** Preparing 100 concurrent users for battle. The server is now under siege.. done. Transactions: 1000 hits Availability: 100.00 % Elapsed time: 32.94 secs Data transferred: 9.99 MB Response time: 2.33 secs Transaction rate: 30.36 trans/sec Throughput: 0.30 MB/sec Concurrency: 70.68 Successful transactions: 1000 Failed transactions: 0 Longest transaction: 5.14 Shortest transaction: 0.02
The important part is that there are now 1000 successful transactions out of 1000 attempted transactions.
Interestingly, I also tried proxying django off to an apache instance running only
mod_python and nothing else. The results were similar to the above with four FCGI listeners, but at the cost of significantly higher memory.