cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Ellis (JIRA)" <>
Subject [jira] [Updated] (CASSANDRA-7542) Reduce CAS contention
Date Fri, 22 Jul 2016 16:34:20 GMT


Jonathan Ellis updated CASSANDRA-7542:
    Fix Version/s:     (was: 2.1.x)

> Reduce CAS contention
> ---------------------
>                 Key: CASSANDRA-7542
>                 URL:
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: sankalp kohli
>             Fix For: 3.x
> CAS updates on same CQL partition can lead to heavy contention inside C*. I am looking
for simple ways(no algorithmic changes) to reduce contention as the penalty of it is high
in terms of latency, specially for reads. 
> We can put some sort of synchronization on CQL partition at StorageProxy level. This
will reduce contention at least for all requests landing on one box for same partition. 
> Here is an example of why it will help:
> 1) Say 1 write and 2 read CAS requests for the same partition key is send to C* in parallel.

> 2) Since client is token-aware, it sends these 3 request to the same C* instance A. (Lets
assume that all 3 requests goto same instance A) 
> 3) In this C* instance A, all 3 CAS requests will contend with each other in Paxos. (This
is bad)
> To improve contention in 3), what I am proposing is to add a lock on partition key similar
to what we do in to serialize these 3 requests. This will remove the contention
and improve performance as these 3 requests will not collide with each other.
> Another improvement we can do in client is to pick a deterministic live replica for a
given partition doing CAS.  

This message was sent by Atlassian JIRA

View raw message