Ignite runs out heap during query (via SQL)

classic Classic list List threaded Threaded
3 messages Options
shaneduan shaneduan
Reply | Threaded
Open this post in threaded view
|

Ignite runs out heap during query (via SQL)

Just wondering, how JVM heap is used in Ignite (Version 2.7) during query. With persistence enabled, I am assuming everything will be stored in the off-heap memory or disk. But during query time, query is failing because Ignite is running heap space. In my test, I have to increase heap size for Ignite to 8Gb with about 5-10 concurrent queries. 

My guess is that Ignite need to process query results using heap. Is that right? If that is the case, any recommendation on JVM heap setting for Ignite?

Thanks,
Shane


Roman Guseinov Roman Guseinov
Reply | Threaded
Open this post in threaded view
|

Re: Ignite runs out heap during query (via SQL)

Hi Shane,

Your understanding is right. During the query execution Ignite copies cache
entries into the heap memory.

Java heap size depends on the SQL queries you perform. If the query fetches
a lot of data it makes sense to increase the max size of the heap.

If the queries use "order by", "group by" or joins then I would recommend
creating indexes to avoid loading all rows of the table into the heap
memory.

Also, it is possible to restrict a number of concurrent SQL queries by
configuring a thread pool size
https://apacheignite.readme.io/docs/thread-pools#section-queries-pool 

Best Regards,
Roman



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
shaneduan shaneduan
Reply | Threaded
Open this post in threaded view
|

Re: Ignite runs out heap during query (via SQL)

Thanks a lot, Roman!

Shane



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