4 ms·
When I see explicit mention of API, it implies there's no running memcache daemon. I dug MySQL 5.7 manual several times, but I couldn't find any proof that thi
by eonil 13y ago
When I see explicit mention of API, it implies there's no running memcache daemon.
I dug MySQL 5.7 manual several times, but I couldn't find any proof that this is just an memcache API atop MySQL.
But I found some proof that says there's a real memcache daemon atop MySQL.
> Running memcached in the same process space as the MySQL server avoids the network overhead of passing requests back and forth.
MySQL 5.7 manual clarifies that they're running memcache daemon inside the database engine in-process mode. So actually real memcache is serving the data atop the engine.
So, if dataset is read-only and small enough, it's likely to happen that whole the data is being served by memcache. In that case, it cannot be slower than memcache.
That's why I couldn't be impressed. The only thing MySQL doing is automatic handling of memcache daemon. That should be convenient, but not impressive.
Maybe I am wrong. If you think I am wrong, please show me some reference that explicitly mentions this is just API, and there's no running memcache instance.
Also, regardless of whatever is really happening under hood, this benchmark is still meaningless. Because database exists to store data and all the hard stuffs are only happening when storing data. Writing transactions usually degrade performance a lot. That's why writing transactions must be included in benchmark to show the real world performance.
- corresation 13y ago>Maybe I am wrong. If you think I am wrong, please show me some reference that explicitly mentions this is just API, and there's no running memcache instance. https://dev.mysql.com/doc/refman/5.6/en/innodb-memcached-benefits.html https://dev.mysql.com/doc/refman/5.6/en/innodb-memcached-ben... Yes, there is a memcached "daemon" in the sense that they run a memcached host within mysql, which they obviously have to do. That memcached "instance" reads and writes from InnoDB and the shared buffer pool also used by the SQL engine: It does not maintain a unique memory instance, and values read or written are atomically consistent with the mySQL instance. The single and only reason this product exists is that the memcached API is much simpler and network/parsing efficient, allowing for much better round-trip-times when doing simple queries.
- eonil 13y agoOK. You're right. MySQL seems using InnoDB buffer pool. I found the mention. > You do not need to manually load data into memcached at startup. As particular keys are requested by an application, the values are retrieved from the database automatically, and cached in memory using the InnoDB buffer pool. So memory-cache is provided the engine itself, not by external plugin.