Redis, Memcached, Tokyo Tyrant and MySQL comparision
ruturaj.net
ruturaj.net
If you just look at the numbers on that page, you would think that Memcached is only 10 times faster than MySQL, but in reality, the speed increase is closer to 100 times or more, because MySQL grows slower the more difficult questions you ask, and the more data you've stored in it. Memcached performance is (almost) independent of the size of the data, and it can only really do one thing, but it does it well.
Then again, if all you're looking to do is to store key/value-pairs, this benchmark is useful.
If I had the time I would rewrite the client code to use the pytyrant interface talking to an in-memory tyrant hash database to see where things really stack up.
EDIT: If anyone wants to run the benchmarks, just replace the import of memcache in tokyo.py with an import of pytyrant, then replace the run loop with:
t = pytyrant.PyTyrant.open('10.90.15.96', 1978)
hashval = md5(str(self.c) + str(i)).hexdigest()
if self.gs == 'set':
t[hashval] = hashval
else:
t[hashval]I think it's a fair comparison, if you ask the question this way.
It seems a lot like trying to compare apples and oranges.
Notice how tokyo tyrant and memcached track each other on the performance graphs while redis is doing much better? That's because memcached and tokyo tyrant using the same client library. Clearly the memcached client he's using isn't as well written as the redis client he's using.
We in the memcached community are trying to figure out which clients behave properly and describe relative performance between clients so people who read things like this can get a feel for what that actually means in real world applications.