You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Grégory Jevardat de Fombelle <gr...@unige.ch> on 2019/01/16 15:03:08 UTC

NearCache

Hello

Is there any option to have  a nearCache in Ignite that store unMarschalled values instead of serialized ones. I ask this for performance reasons.
I noticed that for big cached objects, default Java unserialization is quite expensive, like ~ 2 secs for a complex > 100MB object.  So in the end caching this kind of objects in a near cache is not really interesting given the penalty of the serialisation.
On the opposite caching a reference of this object in a custom applicative cache like ThreadLocal map of even just a Hashmap, the retrieval is almost instantaneous (order of 10-100 nano secs)

Note that I did not tested binary serialisation or storing Json serialized objects or other custom serialisation libraries like protobuf or kryo. Also I'am not sure if it is possible to use custom libraries for serialisation of huge and complex graph of objects.
Are there any options or architectural recommandations and some benchmarks on this topic ? 

Re: NearCache

Posted by Mikhail <mi...@gmail.com>.
Hi Greg,

you can try to use OptimizedMarshaller:

igniteConfig.setMarshaller(new OptimizedMarshaller())

however, this will lead to some limitations, which you can find in java doc
of setMarshaller method.

Thanks,
Mike.



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

Re: NearCache

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

You can have onHeap cache
https://apacheignite.readme.io/docs/memory-configuration#section-on-heap-caching

setting copyOnRead to false will let you keep unmarshalled values in it. Be
sure to avoid modifying them in your code since that's not tracked.

Regards,
-- 
Ilya Kasnacheev


ср, 16 янв. 2019 г. в 18:03, Grégory Jevardat de Fombelle <
gregory.jevardat@unige.ch>:

> Hello
>
> Is there any option to have  a nearCache in Ignite that store
> unMarschalled values instead of serialized ones. I ask this for performance
> reasons.
> I noticed that for big cached objects, default Java unserialization is
> quite expensive, like ~ 2 secs for a complex > 100MB object.  So in the end
> caching this kind of objects in a near cache is not really interesting
> given the penalty of the serialisation.
> On the opposite caching a reference of this object in a custom applicative
> cache like ThreadLocal map of even just a Hashmap, the retrieval is almost
> instantaneous (order of 10-100 nano secs)
>
> Note that I did not tested binary serialisation or storing Json serialized
> objects or other custom serialisation libraries like protobuf or kryo. Also
> I'am not sure if it is possible to use custom libraries for serialisation
> of huge and complex graph of objects.
> Are there any options or architectural recommandations and some benchmarks
> on this topic ?