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

Benedict commented on CASSANDRA-15261:
--------------------------------------

Hi [~sdycreate],

This is in the category of optimisations the project has discussed on a number 
of occasions.  Am I right in understanding that your proposed solution caches 
the _result_ of serialisation, not just its size?  Since the latter should 
already be cached, particularly in 4.0.  This approach would also have some 
negative consequences, by increasing the total amount of memory in flight at 
any one time, potentially increasing the pressure on GC and exacerbating the 
cost of a slow or dying recipient node.

CASSANDRA-9834 would be my starting point here, although it is non-trivial.  As 
part of this work, serialising to the same format would be valuable, (although 
in 4.0 serialization to peers for some data is dependent on the current time in 
nanos, so we would need to update this part when serialising to peers). This 
has the advantage of _reducing_ in-flight memory usage, by eliminating the need 
to maintain the {{Mutation}} object until we receive ACKs for writing hints, 
and permits us to (if necessary) temporarily shed message from main-memory for 
ordinary delivery, without actually shedding the message itself.

This is a fairly involved piece of work, which is why the project hasn't as yet 
undertaken it.

> Improve performance by adding serialize cache in mutation
> ---------------------------------------------------------
>
>                 Key: CASSANDRA-15261
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-15261
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Consistency/Batch Log
>            Reporter: Shen dayu
>            Priority: Normal
>
> I am trying to add a serialize cache in mutation, for there is so many 
> redundant serialization
>  # calculate binary size before serialize to binary, this calculation double 
> the serialization operation.
>  # reuse binary in network message for commitlog, this can reduce a 
> serialization operation
> In my test, I use cassandra version is 3.0.14, and it gains 20% performance 
> improvement.
> I know cassandra 3.0.x only accept critical bug fixes now.
> So I was wondering any one would review my code if I patch this for 4.0



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

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

Reply via email to