openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin Sutter" <kwsut...@gmail.com>
Subject Re: Possible performance concerns?
Date Fri, 27 Oct 2006 01:18:42 GMT
Marc,
Thanks for the reply.  Embedded comments below...

On 10/26/06, Marc Prud'hommeaux <mprudhom@apache.org> wrote:

In some JPQL parsing, we need to check to see if a token is a class
> name or a variable or something else, and we only check that by
> trying a Class.forName(). What kind of performance hit are you seeing
> from this? Are these happening from the same query string, or
> different query strings?


This is from the same query string.  In this primitive test, we're just
driving the same query over and over again.  That's why we were surprised to
see the same Class.forName() invocation.  My original thought was that maybe
the QueryCache would help with this, but that looks to be a cache for the
returned data.

In general, class loading slowness is one of those things that is
> frequently very fast in a stand-alone environment, but can slow down
> dramatically in a managed environment (due to the additional
> complexities of class loading that containers often need to have). It
> would be interesting if you could try the same set of queries in both
> a stand-alone and managed environment and compare the results.


Right now, all of the performance testing is in a stand-alone environment.
The managed environment isn't setup just yet.

It could be the sort of thing where we just need to cache name->class
> mappings (including lookup failures) in the JPQLExpressionBuilder and
> see if that helps at least with repetitive name lookups.


This was one of the thoughts we had as well.  But, I wanted to check base
with you guys first to see if maybe we just didn't have it tuned correctly.
Have you pushed any performance runs with Kodo 4.1 yet?

Thanks,
Kevin

On Oct 25, 2006, at 7:24 PM, Kevin Sutter wrote:
>
> > Hi,
> > We're doing some primitive performance comparisons and the results
> > could be
> > better...  I'm wondering whether there are some configuration
> > properties
> > that need to be tweaked to get more suitable performance.  I've
> > enabled the
> > DataCache and the QueryCache via the following properties, but they
> > didn't
> > help much:
> >
> >            <property name="openjpa.DataCache" value="true"/>
> >            <property name="openjpa.RemoteCommitProvider"
> > value="sjvm"/>
> >            <property name="openjpa.QueryCache" value="CacheSize=1000,
> > SoftReferenceSize=100"/>
> >
> > Looking at some of the thread dumps in sample executions, there
> > seems to be
> > a common theme with this reflective classloading.  (The sample is a
> > simple
> > jpql finder invocation that uses getSingleResult().)  Is this normal
> > processing?  Or, is there some configuration option(s) that would
> > help with
> > this?  Thanks for any ideas.
> >
> > (BTW, this callstack is from a 0.9.0 driver, but we have also
> > reproduced
> > this with a 0.9.5 driver as well.)
> >
> > 4XESTACKTRACE          at
> > java/lang/ClassLoader.loadClass(ClassLoader.java:561(Compiled
> > Code))
> > 4XESTACKTRACE          at java/lang/Class.forNameImpl(Native Method)
> > 4XESTACKTRACE          at java/lang/Class.forName(Class.java:164
> > (Compiled
> > Code))
> > 4XESTACKTRACE          at serp/util/Strings.toClass(Strings.java:160
> > (Compiled
> > Code))
> > 4XESTACKTRACE          at serp/util/Strings.toClass(Strings.java:140
> > (Compiled
> > Code))
> > 4XESTACKTRACE          at org/apache/openjpa/kernel/QueryImpl.toClass(
> > QueryImpl.java:1552(Compiled Code))
> > 4XESTACKTRACE          at org/apache/openjpa/kernel/
> > QueryImpl.classForName(
> > QueryImpl.java:1499(Compiled Code))
> > 4XESTACKTRACE          at
> > org/apache/openjpa/kernel/ExpressionStoreQuery$1.classForName(
> > ExpressionStoreQuery.java:104(Compiled Code))
> > 4XESTACKTRACE          at
> > org/apache/openjpa/kernel/jpql/
> > JPQLExpressionBuilder.getPathOrConstant(
> > JPQLExpressionBuilder.java:1247(Compiled Code))
> > 4XESTACKTRACE          at
> > org/apache/openjpa/kernel/jpql/JPQLExpressionBuilder.eval(
> > JPQLExpressionBuilder.java:861(Compiled Code))
> > 4XESTACKTRACE          at
> > org/apache/openjpa/kernel/jpql/JPQLExpressionBuilder.getValue(
> > JPQLExpressionBuilder.java:1356(Compiled Code))
> > 4XESTACKTRACE          at
> > org/apache/openjpa/kernel/jpql/JPQLExpressionBuilder.getValue(
> > JPQLExpressionBuilder.java:1342(Compiled Code))
> > 4XESTACKTRACE          at
> > org/apache/openjpa/kernel/jpql/JPQLExpressionBuilder.eval(
> > JPQLExpressionBuilder.java:702(Compiled Code))
> > 4XESTACKTRACE          at
> > org/apache/openjpa/kernel/jpql/JPQLExpressionBuilder.getExpression(
> > JPQLExpressionBuilder.java:1333(Compiled Code))
> > 4XESTACKTRACE          at
> > org/apache/openjpa/kernel/jpql/JPQLExpressionBuilder.eval(
> > JPQLExpressionBuilder.java:709(Compiled Code))
> > 4XESTACKTRACE          at
> > org/apache/openjpa/kernel/jpql/JPQLExpressionBuilder.evalWhereClause(
> > JPQLExpressionBuilder.java:484(Compiled Code))
> > 4XESTACKTRACE          at
> > org/apache/openjpa/kernel/jpql/
> > JPQLExpressionBuilder.getQueryExpressions(
> > JPQLExpressionBuilder.java:261(Compiled Code))
> > 4XESTACKTRACE          at org/apache/openjpa/kernel/jpql/
> > JPQLParser.eval(
> > JPQLParser.java:58(Compiled Code))
> > 4XESTACKTRACE          at
> > org/apache/openjpa/kernel/ExpressionStoreQuery
> > $DataStoreExecutor.<init>(
> > ExpressionStoreQuery.java:648(Compiled Code))
> > 4XESTACKTRACE          at
> > org/apache/openjpa/kernel/ExpressionStoreQuery.newDataStoreExecutor(
> > ExpressionStoreQuery.java:162(Compiled Code))
> > 4XESTACKTRACE          at
> > org/apache/openjpa/kernel/QueryImpl.createExecutor(QueryImpl.java:
> > 675(Compiled
> > Code))
> > 4XESTACKTRACE          at
> > org/apache/openjpa/kernel/QueryImpl.compileForDataStore
> > (QueryImpl.java:633(Compiled
> > Code))
> > 4XESTACKTRACE          at
> > org/apache/openjpa/kernel/QueryImpl.compileForExecutor
> > (QueryImpl.java:609(Compiled
> > Code))
> > 4XESTACKTRACE          at org/apache/openjpa/kernel/
> > QueryImpl.getOperation(
> > QueryImpl.java:1421(Compiled Code))
> > 4XESTACKTRACE          at
> > org/apache/openjpa/kernel/DelegatingQuery.getOperation
> > (DelegatingQuery.java:120(Compiled
> > Code))
> > 4XESTACKTRACE          at org/apache/openjpa/persistence/
> > QueryImpl.execute(
> > QueryImpl.java:205(Compiled Code))
> > 4XESTACKTRACE          at
> > org/apache/openjpa/persistence/QueryImpl.getSingleResult
> > (QueryImpl.java:271(Compiled
> > Code))
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message