You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by rajivgandhi <ra...@gmail.com> on 2017/11/08 04:58:04 UTC

Affinity Compute latency

Hi All,
We see a significant difference between the latency nos for
affnityRun(single key)/compute(multiple keys) and get/getall. Our code is
based on the below example:
https://github.com/apache/ignite/blob/master/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheAffinityExample.java

The nos are as follows:
1. get/getall: 700 microseconds 
2. affnityRun/Compute: 7 milliseconds

Is this as expected?

thanks,
Rajeev



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

Re: Affinity Compute latency

Posted by Andrey Mashenkov <an...@gmail.com>.
Hi Ranjeev,

Also it is possible cache.get() return value is deserialized only once on
client side,
but when you use EntryProcessor, entry is deserialized before EP invoke,
then request result serialized before being sent back to client and then
deserialized on client.

Try to use get() for simple operations an use invoke only for changing
large objects.
Also you can try to use BinaryObjects [1] to avoid unnecessary
deserialization.

The numbers itselves make sense only comparing some cases in same
environment as they may differs in different environments.


[1] https://apacheignite.readme.io/docs/binary-marshaller#basic-concepts

On Wed, Nov 8, 2017 at 8:28 PM, rajivgandhi <ra...@gmail.com> wrote:

> Thanks Andrew.
>
> The nos are an average (not 90+ percentile) over a period of 60 minutes!
> We use the default deployment mode which is Shared.
> We used 3 nodes M4.large instances. Throughput less than 200-300 TPS
>
> 1. Are the nos below your expectations?
> 2. Given the above, what changes are recommended?
>
> thanks,
> Rajeev
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>



-- 
Best regards,
Andrey V. Mashenkov

Re: Affinity Compute latency

Posted by rajivgandhi <ra...@gmail.com>.
Thanks Andrew. 

The nos are an average (not 90+ percentile) over a period of 60 minutes! 
We use the default deployment mode which is Shared. 
We used 3 nodes M4.large instances. Throughput less than 200-300 TPS 

1. Are the nos below your expectations? 
2. Given the above, what changes are recommended? 

thanks, 
Rajeev 



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

Re: Affinity Compute latency

Posted by Andrey Mashenkov <an...@gmail.com>.
Hi,

Most likely, first compute call will register a job class and it takes most
of time.
Make sure your class will not be unloaded between compute calls [1].

Try to make much more cycles to benchmark to make it run a few tens of
seconds and add warm-up cycles.
You can see how it done in Ignite yarstick [2] benchmarks [3].


[1] https://apacheignite.readme.io/docs/deployment-modes
[2]
https://apacheignite.readme.io/docs/perfomance-benchmarking#yardstick-ignite-benchmarks
[3] https://github.com/apache/ignite/tree/master/modules/yardstick

On Wed, Nov 8, 2017 at 7:58 AM, rajivgandhi <ra...@gmail.com> wrote:

> Hi All,
> We see a significant difference between the latency nos for
> affnityRun(single key)/compute(multiple keys) and get/getall. Our code is
> based on the below example:
> https://github.com/apache/ignite/blob/master/examples/
> src/main/java/org/apache/ignite/examples/datagrid/
> CacheAffinityExample.java
>
> The nos are as follows:
> 1. get/getall: 700 microseconds
> 2. affnityRun/Compute: 7 milliseconds
>
> Is this as expected?
>
> thanks,
> Rajeev
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>



-- 
Best regards,
Andrey V. Mashenkov