[ 
https://issues.apache.org/jira/browse/IGNITE-6699?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16358296#comment-16358296
 ] 

Ivan Fedotov commented on IGNITE-6699:
--------------------------------------

[~vozerov], 

I inserted a collection and now data from addData(key,value) method are being 
cached in list [1], results of benchmark on adding 1000 integers seem good:

Benchmark                                                     Mode   Cnt      
Score      Error     Units

JmhStreamerCollectionBenchmark.addData  avgt     21     *332,170* ± 34,122  
us/op

JmhStreamerKeyValueBenchmark.addData  avgt      21     *341,228* ± 23,528  us/op

But some details of implementation are still unclear to me:

1. Is default collection size of 500 will be enough? I took this number 
slightly less than default buffer size for node 
(IgniteDataStreamer.DFLT_PER_NODE_BUFFER_SIZE).

2. If I add some data per key value, for example 100 values (< default buffer 
size) and after that add collection also with 100 values (< default buffer size 
per node), should I catch data from both operations in collection or only in 
case of streaming per key/value? This question relates to other combinations of 
these methods.

3. What did you mean by saying "from one thread"? Is placing collection to 
synchronize block will be enough?

[1]https://github.com/apache/ignite/pull/3442

> Optimize client-side data streamer performance
> ----------------------------------------------
>
>                 Key: IGNITE-6699
>                 URL: https://issues.apache.org/jira/browse/IGNITE-6699
>             Project: Ignite
>          Issue Type: Task
>          Components: streaming
>    Affects Versions: 2.3
>            Reporter: Vladimir Ozerov
>            Assignee: Ivan Fedotov
>            Priority: Major
>              Labels: iep-1, performance
>             Fix For: 2.5
>
>
> Currently if a user has several server nodes and a single client node with 
> single thread pushing data to streamer, he will not be able to load data at 
> maximum speed. On the other hand, if he start several data loading threads, 
> throughput will increase. 
> One of root causes of this is bad data streamer design. Method 
> {{IgniteDataStreamer.addData(K, V)}} returns new feature for every operation, 
> this is too fine grained approach. Also it generates a lot of garbage and 
> causes contention on streamer internals. 
> Proposed implementation flow:
> 1) Compare performance of {{addData(K, V)}} vs {{addData(Collection)}} 
> methods from one thread in distributed environment. The latter should show 
> considerably higher throughput.
> 2) Users should receive per-batch features, rather than per-key. 
> 3) Try caching thread data in some collection until it is large enough to 
> avoid contention and unnecessary allocations.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to