"J. Atwood" wrote:
Are you sure that serving images off of Apache has any effect on performance? I did a lot of testing on that (below) and did see any major difference whether Zope served up the image or Apache did (out of a Zope document). There was a slight increase but not enough (I felt) to deal with the extra hassles of not having the images in Zope.
YES. I am sure that serving images off Apache has a big effect on performance. Not only does Apache serving blow the pants off zope serving it alows some of the workload to be offloaded to a system that scales better when hit w/ high concurrent requests. I would say a performance increase of 3x to 9x is worth the extra configuration work. Here are some numbers from my tests w/ ab: Test using ab requesting the same 25K image via three access methods: 1 - Apache Direct: using one file check in httpd.conf to check for existence of file and serving it from FS if it exists. 2 - Zope via FCGI: using mod_FastCGI from Apache to retrieve image from a Zope server on a separate server from Apache. 3 - Zope Direct: using port 8080 accessing Zope directly and requesting the same image. Image Size: 25,646 bytes rps = Request per second min = Connection Times (ms) Total: line min column min = Connection Times (ms) Total: line avg column min = Connection Times (ms) Total: line max column rps min avg max -n 10 -c 1 ============================================= Apache Direct 84.03 11 11 12 (3x over Zope Direct) Zope via FCGI 11.83 44 84 245 Zope Direct 22.32 28 44 139 And if these numbers aren't enough, the chasim just grows from there. FCGI does add some overhead but if you're caching to FS that overhead quickly becomes nominal when you figure the increased serving speed of going staight from file. -n 100 -c 10 (run 1) ============================================= Apache Direct 137.36 15 67 188 (9x over Zope Direct) Zope via FCGI 14.26 215 667 1953 Zope Direct 15.55 289 615 805 -n 100 -c 10 (run 2) ============================================= Apache Direct 142.65 15 65 320 Zope via FCGI 18.55 314 523 1558 Zope Direct 15.19 352 624 819 -n 100 -c 10 (run 3) ============================================= Apache Direct 117.10 17 77 282 Zope via FCGI 16.45 495 582 914 Zope Direct 17.51 178 556 909 -n 100 -c 25 (run 1) ============================================= Apache Direct 136.99 19 162 336 Zope via FCGI 11.89 1359 1937 3050 Zope Direct 15.40 238 1432 1759 -n 100 -c 25 (run 2) ============================================= Apache Direct 139.47 18 153 318 Zope via FCGI 15.67 632 1423 2103 Zope Direct 15.64 270 1402 1731 -n 100 -c 25 (run 3) ============================================= Apache Direct 124.69 19 173 414 Zope via FCGI 14.23 700 1550 2119 Zope Direct 15.53 379 1427 1755 RE: your test suite. What where you actually testing in the ab printouts? I'm confused how you could test image serving rates using ab against test.html. Wouldn't that just test the load times for the HTML and not the images? Don't get me wrong I'm not saying zope is not the greatest dynamic serving enviroment I've every used. It is. I'm just pointing out when it comes to serving a site that's expected to get some serious load, look to the tools at your disposal. Zope alone may not make the cut, but Zope/Apache is truely a great combination. The configuration pains are more than worth it. -- ------------------------------- tonyr@ep.newtimes.com Director of Web Technology New Times, Inc. -------------------------------