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

Aleksey Plekhanov commented on IGNITE-11857:
--------------------------------------------

[~ascherbakov]

We can only change the type from {{long}} to {{int}} for delta values. There is 
no boxing for delta values in the code.

Resident size for both structures is also relatively low.

 
{code:java}
System.out.println("Size: " + 
GraphLayout.parseInstance(benchmark.partCntr).totalSize())
{code}
Old implementation: 1752 bytes

 

TreeMap<Long, Item> (long delta): 2248 bytes

TreeMap<Long, Item> (int delta): 2072 bytes

TreeMap<Long, Integer>: 1816 bytes

Even if we have 100 cache groups with 1000 partitions on each node it's about 
30-50 extra megabytes of heap.

This test is synthetic, in real production cases I think there will be much 
lower values.

TreeMap with int delta has a little drop compared to long deltas and map of 
<Long, Integer> has a little drop compared to int deltas.

Overall comparison table:
||Implementation||Throughput||GC pressure||Footprint||
|Old implementation|4,338 ± 0,208 ops/us|25 182 056|1752|
|TreeMap<Long, Item> (long delta)|6,089 ± 0,459 ops/us|11 828 272|2248|
|TreeMap<Long, Item> (long delta)|5,905 ± 0,338 ops/us|11 436 760|2072|
|TreeMap<Long, Integer>|4,857 ± 0,318 ops/us|10 733 888|1816|

I think we should get "TreeMap<Long, Item> (long delta)" version. What do you 
think?

> Investigate performance drop after IGNITE-10078
> -----------------------------------------------
>
>                 Key: IGNITE-11857
>                 URL: https://issues.apache.org/jira/browse/IGNITE-11857
>             Project: Ignite
>          Issue Type: Improvement
>            Reporter: Alexei Scherbakov
>            Assignee: Aleksey Plekhanov
>            Priority: Major
>         Attachments: ignite-config.xml, 
> run.properties.tx-optimistic-put-b-backup
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> After IGNITE-10078 yardstick tests show performance drop up to 8% in some 
> scenarios:
> * tx-optim-repRead-put-get
> * tx-optimistic-put
> * tx-putAll
> Partially this is due new update counter implementation, but not only. 
> Investigation is required.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to