Is memcached really faster than MySQL on very simple query?
Jamie McCarthy
jamie at mccarthy.vg
Thu Jul 13 12:23:20 UTC 2006
MySQL is a centralized bottleneck, is hard/expensive to add
performance to, and has highly nonlinear performance
characteristics. Memcached is decentralized, cheap/easy to add
performance to, and runs very close to O(1).
So the big win for memcached is not that it is faster than mysql,
but that it takes load off mysql.
If you can move 1000 simple queries per second from your (expensive)
mysql replicator slave network to your (cheap) memcached network,
then even if those queries run slightly slower (which I doubt), you
will be ahead. Your mysqls are freed up to do the complex queries
only they can do, they will run those lengthy queries faster which
will be a net gain in performance for your application, and they
will have more breathing room before the load wedges them up and
effectively takes your whole application down.
Is there an FAQ yet? I nominate this as one entry :)
--
Jamie McCarthy
http://mccarthy.vg/
jamie at mccarthy.vg
More information about the memcached
mailing list