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

Blake Eggleston commented on CASSANDRA-15393:
---------------------------------------------

Here's a rough initial pass at converting cells from buffers to arrays: 
[https://github.com/bdeggleston/cassandra/tree/15387-arrays]

There are {{FIXME}}s everywhere and I still need to clean up some ideas that 
didn't pan out and take another look at cell cloning, but +902/-402 is smaller 
than I was expecting.

I've also started playing around with converting from buffer to a {{Value}} 
type that can be backed by ByteBuffer, byte[], or native memory. It's nicer to 
look at, but is also a much deeper rabbit hole. There is also code in a lot of 
places that relies on ByteBuffers having mutable position that would need to 
reworked and verified.

> 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