You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@calcite.apache.org by "Serafeim (Makis) Papadias" <ma...@gmail.com> on 2019/10/15 10:02:28 UTC

Different performance of the same code in two laptops

Hello everyone,

I am experimenting with rules and volcano optimiser lately and I am facing something weird. I run my code through Intellij IDE. The databases are set the same way in both machines and since I care only about query rewriting for now I just read the table schemas from the databases; I do not execute anything.

The same code on one machine runs 10 times slower than on the other machine.

* I tried to rule out that the IDE is not the problem, so I installed the same versions and picked the exact same vmoptions.
* The database schemas are the same, thus I do not believe it is related with the underneath sources.

Is it possible that calcite uses all the threads available on one machine while running only on thread the other?

If you have any recommendations, they are more that welcome!

Thanks in advance.

Best,
Makis

Re: Different performance of the same code in two laptops

Posted by Enrico Olivelli <eo...@gmail.com>.
Can you share the differences between the two machines? RAM, CPU, OS....

As far as I know internal java ergonomics make code run very differently
depending on available resources


Enrico

Il mar 15 ott 2019, 15:40 Stamatis Zampetakis <za...@gmail.com> ha
scritto:

> Hi Makis,
>
> Use a profiler (e.g., VisualVM) and check where the time goes. You can also
> compare the snapshots between the two machines.
>
> Best,
> Stamatis
>
> On Tue, Oct 15, 2019 at 3:08 PM Michael Mior <mm...@apache.org> wrote:
>
> > I think it's going to be hard for anyone to give you specific advice
> > without more information. How are you measuring the runtime? You may
> > need to instrument the Calcite code, but I would suggest breaking down
> > the runtime more to find out where the slowdown is happening. On a
> > related note, the optimization process is single-threaded, so this
> > would not be your problem.
> > --
> > Michael Mior
> > mmior@apache.org
> >
> > Le mar. 15 oct. 2019 à 06:11, Serafeim (Makis) Papadias
> > <ma...@gmail.com> a écrit :
> > >
> > > Hello everyone,
> > >
> > > I am experimenting with rules and volcano optimiser lately and I am
> > facing something weird. I run my code through Intellij IDE. The databases
> > are set the same way in both machines and since I care only about query
> > rewriting for now I just read the table schemas from the databases; I do
> > not execute anything.
> > >
> > > The same code on one machine runs 10 times slower than on the other
> > machine.
> > >
> > > * I tried to rule out that the IDE is not the problem, so I installed
> > the same versions and picked the exact same vmoptions.
> > > * The database schemas are the same, thus I do not believe it is
> related
> > with the underneath sources.
> > >
> > > Is it possible that calcite uses all the threads available on one
> > machine while running only on thread the other?
> > >
> > > If you have any recommendations, they are more that welcome!
> > >
> > > Thanks in advance.
> > >
> > > Best,
> > > Makis
> >
>

Re: Different performance of the same code in two laptops

Posted by Stamatis Zampetakis <za...@gmail.com>.
Hi Makis,

Use a profiler (e.g., VisualVM) and check where the time goes. You can also
compare the snapshots between the two machines.

Best,
Stamatis

On Tue, Oct 15, 2019 at 3:08 PM Michael Mior <mm...@apache.org> wrote:

> I think it's going to be hard for anyone to give you specific advice
> without more information. How are you measuring the runtime? You may
> need to instrument the Calcite code, but I would suggest breaking down
> the runtime more to find out where the slowdown is happening. On a
> related note, the optimization process is single-threaded, so this
> would not be your problem.
> --
> Michael Mior
> mmior@apache.org
>
> Le mar. 15 oct. 2019 à 06:11, Serafeim (Makis) Papadias
> <ma...@gmail.com> a écrit :
> >
> > Hello everyone,
> >
> > I am experimenting with rules and volcano optimiser lately and I am
> facing something weird. I run my code through Intellij IDE. The databases
> are set the same way in both machines and since I care only about query
> rewriting for now I just read the table schemas from the databases; I do
> not execute anything.
> >
> > The same code on one machine runs 10 times slower than on the other
> machine.
> >
> > * I tried to rule out that the IDE is not the problem, so I installed
> the same versions and picked the exact same vmoptions.
> > * The database schemas are the same, thus I do not believe it is related
> with the underneath sources.
> >
> > Is it possible that calcite uses all the threads available on one
> machine while running only on thread the other?
> >
> > If you have any recommendations, they are more that welcome!
> >
> > Thanks in advance.
> >
> > Best,
> > Makis
>

Re: Different performance of the same code in two laptops

Posted by Michael Mior <mm...@apache.org>.
I think it's going to be hard for anyone to give you specific advice
without more information. How are you measuring the runtime? You may
need to instrument the Calcite code, but I would suggest breaking down
the runtime more to find out where the slowdown is happening. On a
related note, the optimization process is single-threaded, so this
would not be your problem.
--
Michael Mior
mmior@apache.org

Le mar. 15 oct. 2019 à 06:11, Serafeim (Makis) Papadias
<ma...@gmail.com> a écrit :
>
> Hello everyone,
>
> I am experimenting with rules and volcano optimiser lately and I am facing something weird. I run my code through Intellij IDE. The databases are set the same way in both machines and since I care only about query rewriting for now I just read the table schemas from the databases; I do not execute anything.
>
> The same code on one machine runs 10 times slower than on the other machine.
>
> * I tried to rule out that the IDE is not the problem, so I installed the same versions and picked the exact same vmoptions.
> * The database schemas are the same, thus I do not believe it is related with the underneath sources.
>
> Is it possible that calcite uses all the threads available on one machine while running only on thread the other?
>
> If you have any recommendations, they are more that welcome!
>
> Thanks in advance.
>
> Best,
> Makis