[ 
https://issues.apache.org/jira/browse/CASSANDRA-20760?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dmitry Konstantinov updated CASSANDRA-20760:
--------------------------------------------
          Fix Version/s: 5.1
                             (was: 5.x)
    Source Control Link: 
https://github.com/apache/cassandra/commit/19118a6cff8eb6d2a5edeb2667c41c498a4be94e
             Resolution: Fixed
                 Status: Resolved  (was: Ready to Commit)

> Optimize TrieMemtable#getFlushSet
> ---------------------------------
>
>                 Key: CASSANDRA-20760
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-20760
>             Project: Apache Cassandra
>          Issue Type: Improvement
>          Components: Local/Memtable
>            Reporter: Dmitry Konstantinov
>            Assignee: Dmitry Konstantinov
>            Priority: Normal
>             Fix For: 5.1
>
>         Attachments: 5.1_cpu_after.html, 5.1_cpu_before.html, 
> ci_summary_trunk_20760.htm, cpu_profile_after.png, cpu_profile_before.png, 
> cpu_profile_before_pattern.png, results_details_trunk_20760.tar.xz
>
>          Time Spent: 2h 10m
>  Remaining Estimate: 0h
>
> Currently within org.apache.cassandra.db.memtable.TrieMemtable#getFlushSet we 
> iterate over all partitions to retrieve partition key sizes by constructing 
> byte[] for every partition key.
> We can do a similar kind of traversal logic but only count bytes instead of 
> allocating and filling byte[] values. Additionally, we can skip token bytes 
> instead of parsing them.
> cpu heatmap captured using async profiler:  [^5.1_cpu_before.html] 
> !cpu_profile_before.png|width=1000!
> when we do a flush we almost consume 1 cpu core for a about second within 
> getFlushSet:
>  !cpu_profile_before_pattern.png|width=1000!



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to