kylin-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ShaoFeng Shi <shaofeng...@apache.org>
Subject Re: Apache Kylin performance problem
Date Thu, 22 Jun 2017 05:20:35 GMT
Hi Zhifeng,

Thanks for the sharing. A few questions for it: Is this change made in
Apache Calcite (and which version) ? Will it bring any concurrency issue?
If it is safe, that should be merged to Calcite. Thx!

2017-06-22 10:48 GMT+08:00 苏 志锋 <rocsky@live.com>:

> Environment
>
>         Apache kylin 1.6.0
>
>         Jdk1.8.0_72  64-Bit
>
>         any one cube and any one SQL
>
>
>
> Problem
>
>         When the concurrency users count increase, many request’s response
> time become longer and longer, but some are normal.
>
>        This is because when calcite parse the sql.
>
> The function getBindable(org.apache.calcite.adapter.enumerable.EnumerableInterpretable
> ,line 119) dynamic create a bindable instance. The bindalbe instance call
> loadClass(java.lang.ClassLoader line 401)  function which has a
> synchronized java code many times. So, one thead may wait for another.
>
> After I change the following code, the performance become much better.
>
> 1,org.codehaus.janino.ByteArrayClassLoader
>
> +static {
>
> +       ClassLoader.registerAsParallelCapable();
>
> +   }
>
> 2,org.apache.calcite.adapter.enumerable.EnumerableRelImplementor
>
> line 159 return Expressions.classDecl(Modifier.PUBLIC,
>
> -line 160         "Baz",
>
> +line 160         "Baz"+System.currentTimeMillis(),
>
> line 161         null,
>
> line 162         Collections.<Type>singletonList(Bindable.class),
>
> line 163         memberDeclarations);
>



-- 
Best regards,

Shaofeng Shi 史少锋

Mime
View raw message