Re:Memcached 1.6
by jasonwatkinspdx on Monday March 09, 2020 @04:04AM
(#22523765)
You'll get a bunch of garbage answers here to be frank, from people who never put more than trivial load through both.
Memcache blows redis out of the water in terms of raw throughput and latency, like it's not even remotely close on modern lots of cores and big memory machines.
Redis has a more feature rich api, but has fundamentally hobbled itself on a root hash table and concurrency implementation that is circa 1990.
Give memcached a try, even if it means you implement some stuff you currently defer to redis ops. Measure it. Look at the code bases. Make up your own mind about performance and which actually makes your code simpler.
Thanks. I'll make sure to create a PoC and post back here.
http://antirez.com/news/94
TL;DR: Redis is just doing different things, and the slab allocator is pretty efficient in regards to performance but not memory usage.
Fwiw this post comparison is pretty old. The memory usage should be the same or better these days (automatic slab rebalancing, LRU expired item crawler, chunked items, etc).
Re:Memcached 1.6
by manigandham on Sunday March 08, 2020 @10:03PM
(#22522276)
CPU is cheap and memcached has no advanced data structures. If you're using them then you'll probably have to reimplement everything yourself in memcached with less efficiency.
You can always just JSON-encode whatever you’re putting in there and decode on the way out. Though I couldn’t imagine using it for pub/sub like the parent commenter is doing with redis.
Re:Memcached 1.6
by manigandham on Sunday March 08, 2020 @11:36PM
(#22522782)
Which is inefficient and pointless compared to just using Redis with data structures that you can manipulate directly.
Mind giving some examples in more detail about how you make use of lists/scores?
I wonder if memcached would give me performance benefits and lower my CPU costs.