cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Jirsa (JIRA)" <>
Subject [jira] [Updated] (CASSANDRA-12269) Faster write path
Date Tue, 09 May 2017 18:02:04 GMT


Jeff Jirsa updated CASSANDRA-12269:
    Attachment: Screen Shot 2017-05-09 at 10.59.52 AM.png
                Screen Shot 2017-05-09 at 10.59.41 AM.png

Attaching screenshots of the latency numbers for posterity.

> Faster write path
> -----------------
>                 Key: CASSANDRA-12269
>                 URL:
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Local Write-Read Paths, Streaming and Messaging
>            Reporter: T Jake Luciani
>            Assignee: T Jake Luciani
>              Labels: performance
>             Fix For: 3.10
>         Attachments: Screen Shot 2017-05-09 at 10.59.41 AM.png, Screen Shot 2017-05-09
at 10.59.52 AM.png
> The new storage engine (CASSANDRA-8099) has caused a regression in write performance.
 This ticket is to address it and bring 3.X as close to 2.2 as possible. There are four main
reasons for this I've discovered after much toil:
> 1.  The cost of calculating the size of a serialized row is higher now since we no longer
have the cell name and value managed as ByteBuffers as we did pre-3.0.  That means we current
re-serialize the row twice, once to calculate the size and once to write the data.  This happens
during the SSTable writes and was addressed in CASSANDRA-9766.
>      Double serialization is also happening in CommitLog and the MessagingService.  We
need to apply the same techniques to these as we did to the SSTable serialization.
> 2.  Even after fixing (1) there is still an issue with there being more GC pressure and
CPU usage in 3.0 due to the fact that we encode everything from the {{Column}} to the {{Row}}
to the {{Partition}} as a {{BTree}}.  Specifically, the {{BTreeSearchIterator}} is used for
all iterator() methods.  Both these classes are useful for efficient removal and searching
of the trees but in the case of SerDe we almost always want to simply walk the entire tree
forwards or reversed and apply a function to each element.  To that end, we can use lambdas
and do this without any extra classes.
> 3.  We use a lot of thread locals and check them constantly on the read/write paths.
 For client warnings, tracing, temp buffers, etc.  We should move all thread locals to FastThreadLocals
and threads to FastThreadLocalThreads.
> 4.  We changed the memtable flusher defaults in 3.2 that caused a regression see: CASSANDRA-12228

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message