cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin Burton <bur...@spinn3r.com>
Subject Are counters faster than CAS or vice versa?
Date Wed, 20 Jul 2016 18:48:02 GMT
We ended up implementing a task/queue system which uses a global pointer.

Basically the pointer just increments ... so we have thousands of tasks
that just increment this one pointer.

The problem is that we're seeing contention on it and not being able to
write this record properly.

We're just doing a CAS operation now to read the existing value, then
increment it.

I think it might have been better to implement this as a counter.  Would
that be inherently faster or would a CAS be about the same?

I can't really test it without deploying it so I figured I would just ask
here first.

Kevin

-- 

We’re hiring if you know of any awesome Java Devops or Linux Operations
Engineers!

Founder/CEO Spinn3r.com
Location: *San Francisco, CA*
blog: http://burtonator.wordpress.com
… or check out my Google+ profile
<https://plus.google.com/102718274791889610666/posts>

Mime
View raw message