You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ignite.apache.org by Dmitriy Setrakyan <ds...@apache.org> on 2017/11/15 03:53:36 UTC

collocated compute and off-heap cache

Igniters,

I am noticing that some users struggle with performance when using
collocated compute and off-heap cache. The main reason is that collocated
computations access data locally, directly on the server, and with off-heap
cache all binary objects need to be deserialized for every access.

A much more efficient approach is to enable on-heap cache, so the data is
deserialized once and then stored in the on-heap cache. However, the
disadvantage of this approach is that the data foot print in memory doubles
because the data is now stores in both, on-heap and off-heap caches.

What if we suggested the following configuration for the collocated compute
users:

   - enable the *on-heap cache* and make it large enough to fit all the data
   - enable *Ignite native persistence* in BACKGROUND mode, so there is no
   performance overhead for persisting data
   - make *off-heap cache* very small compared to the on-heap cache.

This way, the memory will be consumed by the on-heap cache mostly, the data
will be cached in deserialized form, and there should be no performance
degradation.

Will this approach work?

D.

Re: collocated compute and off-heap cache

Posted by Dmitriy Setrakyan <ds...@apache.org>.
On Wed, Nov 15, 2017 at 8:38 AM, Alexey Goncharuk <
alexey.goncharuk@gmail.com> wrote:

> Dmitriy,
>
> There will be no performance overhead for reads, but there will be a
> significant performance overhead for writes because each update must be
> changed in offheap, and since the offheap will be very small, there will be
> a lot of pages reads and spills.
>

Sounds very strange. Why do we need to read a page if we don't need to read
the entry? Moreover, we do not even need to write into that page, as far as
I know. Are you sure there is no room for optimization here?

Re: collocated compute and off-heap cache

Posted by Alexey Goncharuk <al...@gmail.com>.
Dmitriy,

There will be no performance overhead for reads, but there will be a
significant performance overhead for writes because each update must be
changed in offheap, and since the offheap will be very small, there will be
a lot of pages reads and spills.

2017-11-15 6:53 GMT+03:00 Dmitriy Setrakyan <ds...@apache.org>:

> Igniters,
>
> I am noticing that some users struggle with performance when using
> collocated compute and off-heap cache. The main reason is that collocated
> computations access data locally, directly on the server, and with off-heap
> cache all binary objects need to be deserialized for every access.
>
> A much more efficient approach is to enable on-heap cache, so the data is
> deserialized once and then stored in the on-heap cache. However, the
> disadvantage of this approach is that the data foot print in memory doubles
> because the data is now stores in both, on-heap and off-heap caches.
>
> What if we suggested the following configuration for the collocated compute
> users:
>
>    - enable the *on-heap cache* and make it large enough to fit all the
> data
>    - enable *Ignite native persistence* in BACKGROUND mode, so there is no
>    performance overhead for persisting data
>    - make *off-heap cache* very small compared to the on-heap cache.
>
> This way, the memory will be consumed by the on-heap cache mostly, the data
> will be cached in deserialized form, and there should be no performance
> degradation.
>
> Will this approach work?
>
> D.
>