So I have been reading about how Python 2.3 is about 25% faster than older pythons and I thought I would try it out on some Zope goodness. I compiled Zope27b2 with Python2.3 and started doing some benchmarks. I tweaked a bunch of settings like what servers to start up, debug mode, interval check times but with all of that I could get Zope to max at about 60 requests per second using Apache Bench with 25 concurrency and 500 requests. I went back to my handy dandy Zope 2.5.2 installation and tweaking it I could get it to serve up at about an 85-90 RPS. For these tests I had nothing else running, I ran them more than a few times (for caching to catch up) and shutdown and restarted the servers to make sure there was nothing bad in one run. So is this a Zope27b2 thing? Is it a Python2.3 thing? Am I just testing too many different scenarios so it is not a good test? All of this on my MacOSX 1GHz G4, 2 GB of ram and a 120GB 7200 RPM WD SE drive with 8MB of cache. Here is a typical result with 2.7b2: bash-2.05a$ ab -c 25 -n 500 http://10.0.1.2:8080/index_html This is ApacheBench, Version 1.3d <$Revision: 1.1.1.9 $> apache-1.3 Benchmarking 10.0.1.2 (be patient) Server Software: Zope/(Zope Server Hostname: 10.0.1.2 Server Port: 8080 Document Path: /index_html Document Length: 3014 bytes Concurrency Level: 25 Time taken for tests: 8.529 seconds Complete requests: 500 Failed requests: 0 Broken pipe errors: 0 Total transferred: 1604000 bytes HTML transferred: 1507000 bytes Requests per second: 58.62 [#/sec] (mean) Time per request: 426.45 [ms] (mean) Time per request: 17.06 [ms] (mean, across all concurrent requests) Transfer rate: 188.06 [Kbytes/sec] received Connnection Times (ms) min mean[+/-sd] median max Connect: 0 0 0.0 0 2 Processing: 176 415 70.8 407 733 Waiting: 176 415 70.8 407 733 Total: 176 415 70.7 407 733 And this with Zope 2.5.2 bash-2.05a$ ab -c 25 -n 500 http://10.0.1.2:8080/index_html This is ApacheBench, Version 1.3d <$Revision: 1.1.1.9 $> apache-1.3 Server Software: Zope/(Zope Server Hostname: 10.0.1.2 Server Port: 8080 Document Path: /index_html Document Length: 3164 bytes Concurrency Level: 25 Time taken for tests: 5.085 seconds Complete requests: 500 Failed requests: 0 Broken pipe errors: 0 Total transferred: 1700895 bytes HTML transferred: 1585164 bytes Requests per second: 98.33 [#/sec] (mean) Time per request: 254.25 [ms] (mean) Time per request: 10.17 [ms] (mean, across all concurrent requests) Transfer rate: 334.49 [Kbytes/sec] received Connnection Times (ms) min mean[+/-sd] median max Connect: 0 0 0.1 0 2 Processing: 152 247 34.8 240 586 Waiting: 150 246 34.9 239 586 Total: 152 247 34.8 240 586
BZ wrote:
So is this a Zope27b2 thing? Is it a Python2.3 thing? Am I just testing too many different scenarios so it is not a good test?
What URL's were you hitting? Were they DTML methods, Paeg Templates or something else? Chris
It was the index_html method which just has a call to the zope start. <dtml-var zope_quick_start> BZ On Wednesday, September 3, 2003, at 08:47 AM, Chris Withers wrote:
BZ wrote:
So is this a Zope27b2 thing? Is it a Python2.3 thing? Am I just testing too many different scenarios so it is not a good test?
What URL's were you hitting? Were they DTML methods, Paeg Templates or something else?
Chris
BZ wrote:
It was the index_html method which just has a call to the zope start.
<dtml-var zope_quick_start>
Hmmmm, is zope_quick_star a DTML method in both places? I'm wondering if it became a ZPT in 2.7b2 and that's what's causing the speed difference? cheers, Chris
I went back to check and found a few things: - someone (me) had put a RAM cache on index_html in the 2.5.2 install so I removed it - the 2.5.2 index_html method called standard header and footers so I added that to the 2.7b2 - I could not figure out how to up my ZODB cache in 2.7b2 so I lowered the 2.5.2 to 400 items - Made sure both were debugging off, running FTP, had 20 threads and had an interval check of 3000 (tried a few different ones, they didn't seem to make much difference) New results, best of three tries: Zope 2.5.2 for MacOSX 10.2.6 running on 1 Ghz G4 w/ 2GB of RAM Server Software: Zope/(Zope Server Hostname: 10.0.1.2 Server Port: 8080 Document Path: / Document Length: 3203 bytes Concurrency Level: 25 Time taken for tests: 9.557 seconds Complete requests: 500 Failed requests: 0 Broken pipe errors: 0 Total transferred: 1723868 bytes HTML transferred: 1607906 bytes Requests per second: 52.32 [#/sec] (mean) Time per request: 477.85 [ms] (mean) Time per request: 19.11 [ms] (mean, across all concurrent requests) Transfer rate: 180.38 [Kbytes/sec] received Zope 2.7b2 complied from source with Python 2.3 on MacOSX 10.2.6 running on 1 Ghz G4 w/ 2GB of RAM Server Software: Zope/(Zope Server Hostname: 10.0.1.2 Server Port: 8080 Document Path: / Document Length: 3141 bytes Concurrency Level: 25 Time taken for tests: 4.888 seconds Complete requests: 500 Failed requests: 0 Broken pipe errors: 0 Total transferred: 1670835 bytes HTML transferred: 1573641 bytes Requests per second: 102.29 [#/sec] (mean) Time per request: 244.40 [ms] (mean) Time per request: 9.78 [ms] (mean, across all concurrent requests) Transfer rate: 341.82 [Kbytes/sec] received Connnection Times (ms) min mean[+/-sd] median max Connect: 0 4 16.2 0 88 Processing: 91 234 46.7 228 421 Waiting: 7 233 47.4 228 421 Total: 91 237 39.4 228 421 Looks like I was smoking crack or something the first time, but I am sure that I was seeing the almost direct opposite. Just as an FYI, (because everyone likes to compare to apache, which is neither fair not relevant since it is usually against a static page) on the same machine, on Apache, I am getting around 500 RPS on a very static, 7K index.html. Still, with everything that Zope is doing to be 1/5 the speed is still damn impressive. On a whim I tried 2.6.1 with python 2.1.3 Server Software: Zope/(Zope Server Hostname: 10.0.1.2 Server Port: 8080 Document Path: /index_html Document Length: 3169 bytes Concurrency Level: 25 Time taken for tests: 10.021 seconds Complete requests: 500 Failed requests: 0 Broken pipe errors: 0 Total transferred: 1706800 bytes HTML transferred: 1590838 bytes Requests per second: 49.90 [#/sec] (mean) Time per request: 501.05 [ms] (mean) Time per request: 20.04 [ms] (mean, across all concurrent requests) Transfer rate: 170.32 [Kbytes/sec] received BZ On Thursday, September 4, 2003, at 04:55 AM, Chris Withers wrote:
BZ wrote:
It was the index_html method which just has a call to the zope start. <dtml-var zope_quick_start>
Hmmmm, is zope_quick_star a DTML method in both places?
I'm wondering if it became a ZPT in 2.7b2 and that's what's causing the speed difference?
cheers,
Chris
participants (2)
-
BZ -
Chris Withers