cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Semb Wever (Jira)" <j...@apache.org>
Subject [jira] [Updated] (CASSANDRA-16072) Reduce thread contention in CommitLogSegment and HintsBuffer by rewriting CAS loops to atomic adds
Date Sun, 01 Aug 2021 13:57:00 GMT

     [ https://issues.apache.org/jira/browse/CASSANDRA-16072?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Michael Semb Wever updated CASSANDRA-16072:
-------------------------------------------
          Fix Version/s:     (was: 4.0.x)
                             (was: 3.11.x)
                             (was: 4.x)
                         4.1
                         4.0.1
                         3.11.12
    Source Control Link: https://github.com/apache/cassandra/commit/f575eea034def1103c5403b11fc8fe58b60d3ebe
             Resolution: Fixed
                 Status: Resolved  (was: Ready to Commit)

Committed as [f575eea034def1103c5403b11fc8fe58b60d3ebe|https://github.com/apache/cassandra/commit/f575eea034def1103c5403b11fc8fe58b60d3ebe].

> Reduce thread contention in CommitLogSegment and HintsBuffer by rewriting CAS loops to
atomic adds
> --------------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-16072
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-16072
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Consistency/Hints, Local/Commit Log
>            Reporter: Michael Semb Wever
>            Assignee: Michael Semb Wever
>            Priority: Normal
>             Fix For: 3.11.12, 4.0.1, 4.1
>
>
> Follow up to CASSANDRA-15922
> Both CommitLogSegment and HintsBuffer use AtomicIntegers for the current offset when
allocating. Like in CASSANDRA\-15922 the loops on {{.compareAndSet(..)}} can be replaced with
atomic adds using the {{. getAndAdd(..)}} method.
> In highly contended environments the CAS failures can be high, starving writes in a running
Cassandra node. On the same cluster CASSANDRA\-15922 was found, after CASSANDRA\-15922's fix
was deployed, there was still problems around commit log flushing and hints. No flamegraph
was collected that demonstrated the thread contention as clearly as was found in CASSANDRA\-15922,
but the performance fix proposed here hopefully is obvious enough.



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

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


Mime
View raw message