ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pavel Vinokurov <vinokurov.pa...@gmail.com>
Subject Re: Slow invoke call
Date Thu, 05 Apr 2018 06:38:52 GMT
Hi Sam,

When you store entries into the off-heap, any update operation requires
copying value from the off-heap to the heap.
Thus frequent updates of  the "heavy" entry  lead to significant overheads
for copying data.
Have you tested only with the heap memory?

Thanks,
Pavel

2018-04-05 4:44 GMT+03:00 javastuff.sam@gmail.com <javastuff.sam@gmail.com>:

> Hi,
>
> I have a usecase where we are storing byte array into one of the OFFHEAP
> ATOMIC cache. Multiple threads keep on appending bytes to it using remote
> operation (Entry processor / invoke call).
>
> Below is the logic for remote operation.
>
> if (mutableEntry.exists()) {
>         MyObject m = (MyObject)mutableEntry.getValue();
>         byte[] bytes = new byte[m.getContent().length +
> newContent.getContent().length];
>         System.arraycopy(m.getContent(), 0, bytes, 0,
> m.getContent().length);
>         System.arraycopy(newContent.getContent(), 0, bytes,
> m.getContent().length,newContent.getContent().length);
>         m.setContent(bytes);
>         mutableEntry.setValue(m);
> } else {
>         mutableEntry.setValue(newContent);
> }
>
> We tested by adding about 25MB of content.
>
> What we have seen is -
> 1. In 8 threads test we have seen average time for Invoke() is 36ms.
> 2. Out of total time taken to execute Invoke(), 50% time taken by above
> remote logic. Where does other 50% spend? Probably just to invoke the
> method.
>
> What can we tune here? We are considering InvokeAll(), any more ideas?
>
> If we increase this to 250MB we have seen a very slow performance and after
> hours it goes Out-of-memory, setOffHeapMaxMemory(0) does not help on 32GB
> box.
>
> We are using Ignite 1.9, Java 1.8, Parallel GC and app JVM is 4GB.
> Unfortunately, we can not upgrade Ignite version as of now.
>
> Thanks,
> -Sam
>
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>



-- 

Regards

Pavel Vinokurov

Mime
View raw message