Did you "compile" the app before running the benchmarks? Can you say more about "The most important thing: effects depend much on what you import. " imports should be cached and should not make a difference.
Massimo On Mar 17, 8:20 pm, Kuba Kucharski <kuba.kuchar...@gmail.com> wrote: > This is probably obvious but I decided to try this myself: > > Should one run web2py with Pound on multi-core server? > > probably yes if you deal with concurrent connections.. > > This is my config: > > 2.6.31-19-generic-pae > Intel(R) Xeon(R) CPU E5410 @ 2.33GHz > Ubuntu 64bit > one processor with 4 cores > > disk is serial ata, with performance around this: > > #/sbin/hdparm -t /dev/sda > > /dev/sda: > Timing buffered disk reads: 268 MB in 3.01 seconds = 88.96 MB/sec > > This is slow. This is one SATA disk. > > I used mysql-5.1 for "writing" tests. I run it on the same machine. Also > POUND. > > "ab" command runs on my 32bit ubuntu laptop with 2.5 Ghz Core2Duo. > Server and laptop are connected via Gigabit ethernet directly. > > I did 12 concurrent connections with 2000 calls, and then 1 connection > with 2000 calls test for every case. Application was compiled. I set > migrate=False. > > READING: > ======== > > ROCKET : > ---------------- > r...@kubatron:/home/kuba/httperf-0.9.0/src# ab -n 2000 -c > 12http://192.168.0.1:8000/vae/default/benchmark2 > > Concurrency Level: 12 > Time taken for tests: 15.441 seconds > Complete requests: 2000 > Failed requests: 0 > Write errors: 0 > Total transferred: 852000 bytes > HTML transferred: 236000 bytes > Requests per second: 129.52 [#/sec] (mean) > Time per request: 92.647 [ms] (mean) > Time per request: 7.721 [ms] (mean, across all concurrent requests) > Transfer rate: 53.88 [Kbytes/sec] received > > #for concurrency level: 1 > > #Requests per second: 157.27 [#/sec] (mean) > #Time per request: 6.359 [ms] (mean) > #Time per request: 6.359 [ms] (mean, across all concurrent requests) > #Transfer rate: 65.43 [Kbytes/sec] received > > POUND + 4 x ROCKET : > -------------------- > > r...@kubatron:/home/kuba/httperf-0.9.0/src# ab -n 2000 -c > 12http://192.168.0.1:8080/vae/default/benchmark2 > > Concurrency Level: 12 > Time taken for tests: 6.828 seconds > Complete requests: 2000 > Failed requests: 0 > Write errors: 0 > Total transferred: 852000 bytes > HTML transferred: 236000 bytes > Requests per second: 292.91 [#/sec] (mean) > Time per request: 40.968 [ms] (mean) > Time per request: 3.414 [ms] (mean, across all concurrent requests) > Transfer rate: 121.86 [Kbytes/sec] received > > This is faster!! More than twice! > > #for concurrency level: 1 > > #Requests per second: 129.28 [#/sec] (mean) > #Time per request: 7.735 [ms] (mean) > #Time per request: 7.735 [ms] (mean, across all concurrent requests) > #Transfer rate: 53.78 [Kbytes/sec] received > > WRITING(mysql innodb)-> to see writing bottleneck > ================================================= > > ROCKET : > > r...@kubatron:/home/kuba/httperf-0.9.0/src# ab -n 2000 -c > 12http://192.168.0.1:8000/vae/default/benchmark > > Concurrency Level: 12 > Time taken for tests: 23.466 seconds > Complete requests: 2000 > Failed requests: 0 > Write errors: 0 > Total transferred: 858429 bytes > HTML transferred: 242121 bytes > Requests per second: 85.23 [#/sec] (mean) > Time per request: 140.798 [ms] (mean) > Time per request: 11.733 [ms] (mean, across all concurrent requests) > Transfer rate: 35.72 [Kbytes/sec] received > > #for concurrency level: 1 > > #Requests per second: 15.69 [#/sec] (mean) > #Time per request: 63.735 [ms] (mean) > #Time per request: 63.735 [ms] (mean, across all concurrent requests) > #Transfer rate: 6.57 [Kbytes/sec] received > > POUND + 4 x ROCKET : > -------------------- > > r...@kubatron:/home/kuba/httperf-0.9.0/src# ab -n 2000 -c > 12http://192.168.0.1:8080/vae/default/benchmark > > Concurrency Level: 12 > Time taken for tests: 17.797 seconds > Complete requests: 2000 > Failed requests: 0 > Write errors: 0 > Total transferred: 858308 bytes > HTML transferred: 242000 bytes > Requests per second: 112.38 [#/sec] (mean) > Time per request: 106.783 [ms] (mean) > Time per request: 8.899 [ms] (mean, across all concurrent requests) > Transfer rate: 47.10 [Kbytes/sec] received > > This is faster too. > > #for concurrency level: 1 > > #Requests per second: 15.27 [#/sec] (mean) > #Time per request: 65.468 [ms] (mean) > #Time per request: 65.468 [ms] (mean, across all concurrent requests) > #Transfer rate: 6.40 [Kbytes/sec] received > > model is: > --------- > > #yes I need Service in my other controllers(xml-rpc) > from gluon.tools import Service > > db = DAL('mysql://root:passw...@localhost/vae2') > session.forget() > service=Service(globals()) > > db.define_table('call_attempt',Field('requestedexten'),Field('requestingexten'),Field('calltime'),Field('uniqueid'),Field('transfer_capability'),Field('context'),Field('host'),Field('tmstmp','datetime',default=request.now),Field('owner',default=1),Field('ended',default="no"),migrate=False) > > controllers are(few more not in this listing): > ------------ > > #writing > def benchmark(): > > return > dict(db=db.call_attempt.insert(requestedexten="123123",requestingexten="12323234",calltime="2010-10-10-17:23:32",uniqueid="123123123.123123",transfer_capability="SOUND",context="asd",host="benchmark")) > > #reading > def benchmark2(): > > return dict(data="test") > > btw I do not extend layout.html in my view, I just beautify(response.vars). > The most important thing: effects depend much on what you import. > > -- > Kuba -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.