[Zope] Re: Threading, dtml and performance?!

Tony McDonald tony.mcdonald@ncl.ac.uk
Thu, 08 Nov 2001 06:16:40 +0000


On 7/11/01 3:02 pm, "Paul Zwarts" <paz@oratrix.com> wrote:

> Hi all,
> 
> As a suggestion for Solaris users (Im on linux) please be sure to check
> that your PYTHON thread is the culprit and NOT the database thread. They
> are indeed two separate issues. Why I say this is because I don't know
> much about Solaris, but on Redhat linux (kernel 2.4+) a ps -ef command
> returns the status of the database thread.
> 

Good point Paul - thing is, this threading issue occurs without using a
database adaptor. 

The original post used some standard DTML that did a Catalog search to
demonstrate the problem. A different version of the DTML method used a
._range() construct to do much the same thing.

> What we experienced months ago was the very same issue. (as per this
> thread in its history). We had thought that python was the culprit (we
> used to be on Irix 6.5 which doesn't feedbak thread status). What it
> turned out to be was UPDATE WAITING or COMMIT WAITING was appended to
> the thread. Not python at all, but the database driver. When a stalled
> thread ocurrs, zope stalls because its waiting for the thread to close.
> This action is required because it supports the required sql locking
> schema. Otherwise you get ancient problems of updates impinging on
> updates causing bad data integrity.
> 

That would certainly make sense.

> We had never experienced crashes, related directly to this, but we have
> had crashes. That at first made me think of this same problem, but then
> watching activity in the
> manage_interface/control_panel/debug/refresh+1second showed me a python
> process in a loop that caused the crash. That culprit was entirely bad
> programming practice on my part.
> 

Thing is, if you try that on Solaris, you get nowhere, as the python process
in a loop grabs the only thread you've got! :)

> I don't know if this blurb helps anyone, but I hope I can cause some
> ideas to occur per narrowing down the possibilities.
> 

I think that ideas are about the only thing that is driving this forward at
the moment, well, everything *I've* tried has got me nowhere so far.

I'm getting totally exasperated with this, is this the right list to be even
discussing this I wonder, zope-dev maybe?

> It may also be worth noting that we still run zope 2.3.3 to this date
> because python2 just seems simply to be slower. Perhaps this weekend
> I'll take a second stab at building a test server on python2 and the
> latest zope. If I learn anything more, I'll update...
> 
> Cheers,
> Paul Zwarts

That'd be great. Thanks for the thoughts,
Tone.
-- 
Dr Tony McDonald,  Assistant Director, FMCC, http://www.fmcc.org.uk/
The Medical School, Newcastle University Tel: +44 191 243 6140
A Zope list for UK HE/FE  http://www.fmcc.org.uk/mailman/listinfo/zope