| william_os4y ( @ 2005-12-31 14:13:00 |
| Entry tags: | axiom, nevow, twisted |
Axiom performances
Axiom is a Divmod product that build the link between you python (twisted) programs and you SQLite DB.
Here after some "stress tests" of Axiom within a simple wiki twisted+Nevow application I've made (wiki.tgz).
Configuration:python-2.4.2, Twisted-2.1, Nevow-0.7.0, Axiom-0.4.0, pysqlite-2.0.4, sqlite-3.2.1 on "Linux gentoo 2.4.26 #2 SMP Fri Jun 25 21:32:12 CEST 2004 i686 AMD Athlon(tm) XP 2000+ AuthenticAMD GNU/Linux"
- 100000 insert within (sec):68.878923893. (within 1 transaction). Quite amazing. I would just mention that during this insert the memory used by the python process increases and goes up to 160MB!!!.
- nice -n 20 ab2 -n1000 -c100 is not impacted by the DB size, and the result is 38#/sec with or without an empty DB. Here the twisted process does not eat more than 14.3MB and stays stable.
- Because ab is always requesting the same URL, I've written testor.py (loop that use urllib2.urlopen) that will request 1000 different URLs. During this test the memory consumption stays stable to 14.4MB. Very good!!!!. Just for information, this test gives: " 1000 different http requests in 29.004860878 sec Min: 0.0249710083008, Max: 0.10649895668 "
- Twisted+Nevow+Axiom resist very well to a massive load of 100 concurrent requests
- Despite Axiom is not a ORM like SQLObject, Axiom is a good solution to interact with SQLite. I've tested it on Gentoo and Windows.
- Axiom interact only with SQLite. I would really like to see Axiom interfacing with other DB like postgresql. I think that Divmod developers would like too, but don't have the time right now to do it. Any volunteers ?
Appendix: With 100000 different records within the DB
This is ApacheBench, Version 2.0.41-dev <$Revision: 1.121.2.12 $> apache-2.0
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/
Benchmarking localhost (be patient)
Server Software: TwistedWeb/2.1.0
Server Hostname: localhost
Server Port: 8080
Document Path: /Front
Document Length: 507 bytes
Concurrency Level: 100
Time taken for tests: 26.300422 seconds
Complete requests: 1000
Failed requests: 1
(Connect: 0, Length: 1, Exceptions: 0)
Write errors: 0
Total transferred: 629001 bytes
HTML transferred: 507001 bytes
Requests per second: 38.02 [#/sec] (mean)
Time per request: 2630.042 [ms] (mean)
Time per request: 26.300 [ms] (mean, across all concurrent requests)
Transfer rate: 23.35 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 423 1082.7 2 9035
Processing: 31 2022 856.7 1818 10726
Waiting: 4 2018 857.5 1816 10726
Total: 64 2445 1431.7 1999 10728
Percentage of the requests served within a certain time (ms)
50% 1999
66% 2480
75% 2553
80% 2687
90% 4640
95% 4918
98% 8667
99% 8667
100% 10728 (longest request)
Appendix: With a empty SQLite-3.2.1 DB
This is ApacheBench, Version 2.0.41-dev <$Revision: 1.121.2.12 $> apache-2.0
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/
Benchmarking localhost (be patient)
Server Software: TwistedWeb/2.1.0
Server Hostname: localhost
Server Port: 8080
Document Path: /Front
Document Length: 507 bytes
Concurrency Level: 100
Time taken for tests: 25.458599 seconds
Complete requests: 1000
Failed requests: 1
(Connect: 0, Length: 1, Exceptions: 0)
Write errors: 0
Total transferred: 632146 bytes
HTML transferred: 509536 bytes
Requests per second: 39.28 [#/sec] (mean)
Time per request: 2545.860 [ms] (mean)
Time per request: 25.459 [ms] (mean, across all concurrent requests)
Transfer rate: 24.24 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 447 1258.4 2 9046
Processing: 58 1990 604.3 2071 5247
Waiting: 32 1984 600.7 2068 5246
Total: 120 2438 1433.2 2140 10190
Percentage of the requests served within a certain time (ms)
50% 2140
66% 2564
75% 2572
80% 2609
90% 4497
95% 5636
98% 6097
99% 6097
100% 10190 (longest request)