You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're updating the memcached gem as we're fairly out of date at this point, and noticed in some particularly hot areas of code, we're now seeing what looks like double the amount of network hops to our memcached cluster, as well as overall 2x to 3x more time spent in memcached code.
I tracked down the differences in the code between the two versions, and found this:
It seems there was a compare and swap call added to every single-item lookup, if you have cas enabled. We do use cas in some places with our memcached client, but those are explicit calls to compare and swap. It seems odd that just because we want to use cas in some place, it's now being used in others as well.
Would the constant calls to cas be responsible for the performance regression? It seems as though it would account for the 2x hits to memcache itself, as well as the extra time spent in memcached code.
Is there a way to disable it? Would it be harmful to do so?
Thanks
The text was updated successfully, but these errors were encountered:
I no longer work for the company where we were having this issue, sorry! I don't believe we ever found a workaround, we just ate the cost and moved on, iirc.
Hello,
We're updating the memcached gem as we're fairly out of date at this point, and noticed in some particularly hot areas of code, we're now seeing what looks like double the amount of network hops to our memcached cluster, as well as overall 2x to 3x more time spent in memcached code.
I tracked down the differences in the code between the two versions, and found this:
Original code (1.6.x):
https://github.com/arthurnn/memcached/blob/memcached-1.6.1/lib/memcached/memcached.rb#L519-L524
New code (1.8):
memcached/lib/memcached/memcached.rb
Lines 671 to 677 in f9d4d78
It seems there was a compare and swap call added to every single-item lookup, if you have cas enabled. We do use cas in some places with our memcached client, but those are explicit calls to compare and swap. It seems odd that just because we want to use cas in some place, it's now being used in others as well.
Thanks
The text was updated successfully, but these errors were encountered: