cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Stupp (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (CASSANDRA-9797) Don't wrap byte arrays in SequentialWriter
Date Tue, 14 Jul 2015 11:16:04 GMT

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

Robert Stupp edited comment on CASSANDRA-9797 at 7/14/15 11:15 AM:
-------------------------------------------------------------------

cstar is happy with your patch :)
http://cstar.datastax.com/tests/id/06aa908e-2a0b-11e5-ac85-42010af0688f
GC stats look better

-From my POV: +1-

EDIT: Sorry - [cassci complains|http://cassci.datastax.com/view/Dev/view/snazy/job/snazy-9797-pcmanus-testall/1/]


was (Author: snazy):
cstar is happy with your patch :)
http://cstar.datastax.com/tests/id/06aa908e-2a0b-11e5-ac85-42010af0688f
GC stats look better

>From my POV: +1

> Don't wrap byte arrays in SequentialWriter
> ------------------------------------------
>
>                 Key: CASSANDRA-9797
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-9797
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Sylvain Lebresne
>            Assignee: Sylvain Lebresne
>            Priority: Minor
>              Labels: performance
>             Fix For: 3.x
>
>         Attachments: 9797.txt
>
>
> While profiling a simple stress write run ({{cassandra-stress write n=2000000 -rate threads=50}}
to be precise) with Mission Control, I noticed that a non trivial amount of heap pressure
was due to the {{ByteBuffer.wrap()}} call in {{SequentialWriter.write(byte[])}}. Basically,
when writing a byte array, we wrap it in a ByteBuffer to reuse the {{SequentialWriter.write(ByteBuffer)}}
method. One could have hoped this wrapping would be stack allocated, but if Mission Control
isn't lying (and I was told it's fairly honest on that front), it's not. And we do use that
{{write(byte[])}} method quite a bit, especially with the new vint encodings since they use
a {{byte[]}} thread local buffer and call that method.
> Anyway, it sounds very simple to me to have a more direct {{write(byte[])}} method, so
attaching a patch to do that. A very quick local benchmark seems to show a little bit less
allocation and a slight edge for the branch with this patch (on top of CASSANDRA-9705 I must
add), but that local bench was far from scientific so happy if someone that knows how to use
our perf service want to give that patch a shot.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message