high loads, more threads, spinning wheels
I've been doing some simple load tests on a zope application, and I've found when i increase the zserver-threads in zope.conf very much the zope server goes into some sort of cycle where it eats 100% cpu and refuses to any future requests until restarted. The load test is simply a small threaded python script that flings up to 50 "simultaneous" random queries at the zope app. (The app is basically a search engine, using tsearch2 on postgresql... the tester flings random words at it as arguments; everything is dynamic for this test, no ram-cache objects, etc -- the database queries themselves seem to maintain very quick responses, the server seems to bog down more in the template rendering, or whatever else, after the data is returned). The zserver is behind apache (using mod_rewrite proxy). The single zserver is using a ZEO server (via localhost) for storage. The test seems to run okay with up to around 7 or 8 threads; the more threads are added the sooner the server seems to gum up. 10 is a bit flaky. Sometimes the tests fail, some complete (around 5000 requests). 12 more consistently, and sooner, gets stuck. And so on. I've twiddled with various config file settings such as the various cache settings and whatnot; not really knowing what they are, i tend to just increase them and see what happens. I'm wondering if someone who knows the internals more might have some idea what's going on here. Or any tips on how to debug what zope is doing when it gets into this state. This is Zope 2.7.5 (on FreeBSD, Python 2.3.4). -- Tim Middleton | Vex.Net | I have lived through whole tragedies x@veX.net | VexTech.ca | without speaking a word. --Dost. (GC)
Tim Middleton <zope@zope.org> wrote:
I'm wondering if someone who knows the internals more might have some idea what's going on here. Or any tips on how to debug what zope is doing when it gets into this state.
You can use DeadlockDebugger. Florent -- Florent Guillaume, Nuxeo (Paris, France) CTO, Director of R&D +33 1 40 33 71 59 http://nuxeo.com fg@nuxeo.com
Which, BTW, is one of the coolest things ever! Still trying to figure out what it all means but it has really helped us to find things that were slowing us down. THANKS THANKS THANKS to Florent!! Allen Florent Guillaume wrote:
Tim Middleton <zope@zope.org> wrote:
I'm wondering if someone who knows the internals more might have some idea what's going on here. Or any tips on how to debug what zope is doing when it gets into this state.
You can use DeadlockDebugger.
Florent
On Apr 25, 2005, at 17:46, Tim Middleton wrote:
I've been doing some simple load tests on a zope application, and I've found when i increase the zserver-threads in zope.conf very much the zope server goes into some sort of cycle where it eats 100% cpu and refuses to any future requests until restarted.
To put it in a very simple way, you should not tweak the threads setting unless you really know what you are doing. If your goal is performance the usual way of going about that is to run ZEO and add ZEO clients as needed. You're bumping into the very simple fact that there are two items interacting badly: Threads and the connections in the Zope database connection pool. A thread, under normal circumstances, can only do work if it has a connection to work with, and wwill only release the connection when the request is finished. There are 7 connections in the pool by default. jens
participants (4)
-
Allen Schmidt -
Florent Guillaume -
Jens Vagelpohl -
Tim Middleton