[Zope-DB] Re: Zope-DCOracle2 vs Tomcat-JDBC performance

Matthew T. Kromer matt@zope.com
Tue, 27 May 2003 11:49:19 -0400


Umberto Nicoletti wrote:

>>
>> Well, there are ways to trace DCOracle2's timing -- so you can look 
>> for places where DCOracle2 is causing slowdowns.
>>
>
> That's cool. Should I use the profiler to do this?



Well, the way you enable DCOracle2 tracing is by setting the environment 
variables DCO2TRACEFLAGS and DCO2TRACELOG  -- Trace codes 33 and 34 
track oracle calls and returns, so you can

export DCO2TRACEFLAGS=47
export DCO2TRACELOG=dco2.trc

and restart Zope -- and it will log *large* amounts of data to 
dco2.trc.  The first column in the log is a timestamp, so between any 33 
and 34 codes for the same call you can see how long Oracle took to 
execute that particular call.  The trace flags is a binary OR of trace 
codes, based on the README -- so 47 = 1 + 2 + 4 + 8 + 32.  This is 
Oracle calls, Oracle returns, Oracle errors, and thread context switches.

However, I dont actually expect the DCOracle2 database adapter layer to 
be the issue -- at least, not directly.  I do not know how well it will 
perform for you though with large numbers of connections to the database.

If you do try turning on this tracing and just inspecting the trace 
file, you may be able to spot some significiant time jumps interspersed 
with thread switches -- if you see those, that can be significant.

>> Note that Zope's security policy is still going to check access to 
>> every element returned by a database adapter, whether or not it is 
>> cached.
>>
>>
> That's what I supposed and Dieter confirmed.
>
> Thanks to all of you helping me out...
> Umberto


You *may* be able to install the zope call profiler and get some numbers 
for an individual request to see where it is spending its time. I'd give 
that a go to see what you can see.


-- 
Matt Kromer
Zope Corporation  http://www.zope.com/