You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by the_palakkaran <ji...@suntecsbs.com> on 2018/08/09 10:41:24 UTC

H2 performs better than ignite !!?

Hi,

When I tried running few db lookup scenarios in H2 and ignite, I got better
performance for H2. All were basic db operations like =, <=, >=.

These were the figures for 2million records(2 lookups for one record)

H2 : 3 minutes

Ignite (cache gets based on keys) : 3.4 minutes

Ignite (SQLFields query based) : 5 minutes

Below is my sample cache config:

    cacheConfig = new CacheConfiguration<>("paramControlCache");
    cacheConfig.setIndexedTypes(Key.class, Model.class;
    cacheConfig.setReadThrough(false);
    cacheConfig.setAtomicityMode(ATOMIC);
    cacheConfig.setCacheMode(CacheMode.PARTITIONED);
    cacheConfig factory = new CacheCacheFactory();
    cacheConfig.setCacheStoreFactory(factory);
    cacheConfig.setDataRegionName("CacheDataRegion");
    cacheConfig.setOnheapCacheEnabled(true);

How does this happen? Is there something I am missing out ??





--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: H2 performs better than ignite !!?

Posted by Denis Magda <dm...@apache.org>.
Please share the queries you are running and their execution plans. How
much RAM is allocated to Ignite and what's the overall data size?

--
Denis

On Thu, Aug 9, 2018 at 5:39 AM the_palakkaran <ji...@suntecsbs.com> wrote:

> Yes, I am running on a single node. Still ignite being in-memory, I
> expected
> it to perform better than H2. Is there anything I can do to make it faster?
> Like right now I have a single data region, does having multiple data
> regions give me better performance? Something like that?
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>

Re: H2 performs better than ignite !!?

Posted by Ilya Kasnacheev <il...@gmail.com>.
Hello!

The expectation is that distributed grid will inherently work slower on
single node than dedicated DB.
However, distributed grid will also work on multiple node, when traditional
DB wouldn't.
So extracting every last bit of single-node performance takes a back seat
when also considering multi-node performance and distributed querying.

Note that Apache Ignite also has more features than plain H2, such as data
streamers, near caching, expiry/eviction, etc, etc, and there's some
overhead.

Regards,

-- 
Ilya Kasnacheev

2018-08-09 15:39 GMT+03:00 the_palakkaran <ji...@suntecsbs.com>:

> Yes, I am running on a single node. Still ignite being in-memory, I
> expected
> it to perform better than H2. Is there anything I can do to make it faster?
> Like right now I have a single data region, does having multiple data
> regions give me better performance? Something like that?
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>

Re: H2 performs better than ignite !!?

Posted by the_palakkaran <ji...@suntecsbs.com>.
Yes, I am running on a single node. Still ignite being in-memory, I expected
it to perform better than H2. Is there anything I can do to make it faster?
Like right now I have a single data region, does having multiple data
regions give me better performance? Something like that?



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: H2 performs better than ignite !!?

Posted by Mikael <mi...@telia.com>.
Hi!

H2 is optimized for what it does and it's data format, only the H2 
parser is used in Ignite, if you run a single node you should expect it 
to be a bit slower compared to H2, are you running a single node ?

It's only if you have multiple nodes you can expect it to be faster 
(depending of course on the data and where it is located and so on).

Mikael


Den 2018-08-09 kl. 12:41, skrev the_palakkaran:
> Hi,
>
> When I tried running few db lookup scenarios in H2 and ignite, I got better
> performance for H2. All were basic db operations like =, <=, >=.
>
> These were the figures for 2million records(2 lookups for one record)
>
> H2 : 3 minutes
>
> Ignite (cache gets based on keys) : 3.4 minutes
>
> Ignite (SQLFields query based) : 5 minutes
>
> Below is my sample cache config:
>
>      cacheConfig = new CacheConfiguration<>("paramControlCache");
>      cacheConfig.setIndexedTypes(Key.class, Model.class;
>      cacheConfig.setReadThrough(false);
>      cacheConfig.setAtomicityMode(ATOMIC);
>      cacheConfig.setCacheMode(CacheMode.PARTITIONED);
>      cacheConfig factory = new CacheCacheFactory();
>      cacheConfig.setCacheStoreFactory(factory);
>      cacheConfig.setDataRegionName("CacheDataRegion");
>      cacheConfig.setOnheapCacheEnabled(true);
>
> How does this happen? Is there something I am missing out ??
>
>
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>
>