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

Benedict Elliott Smith commented on CASSANDRA-15393:
----------------------------------------------------

So first we would have to ensure we materialise to the heap anything we hold 
onto with unknown lifetime (e.g. {{ColumnIndex.firstClustering}}, much like 
with flushing).  I don't think there are many such places.

We could then use the fact that an {{Unfiltered}} is immediately discarded 
after being written, to keep in memory at most 2 {{Unfiltered}} - the one we're 
maybe using, and the one that might now have been peeked at for use in the 
{{MergeIterator}}.

I don't think anything more should be needed, but we'd have to look carefully.

> Add byte array backed cells
> ---------------------------
>
>                 Key: CASSANDRA-15393
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-15393
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: Local/Compaction
>            Reporter: Blake Eggleston
>            Assignee: Blake Eggleston
>            Priority: Normal
>             Fix For: 4.0
>
>
> We currently materialize all values as on heap byte buffers. Byte buffers 
> have a fairly high overhead given how frequently they’re used, and on the 
> compaction and local read path we don’t do anything that needs them. Use of 
> byte buffer methods only happens on the coordinator. Using cells that are 
> backed by byte arrays instead in these situations reduces compaction and read 
> garbage up to 22% in many cases.



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

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

Reply via email to