您的位置:首页 > 数据库 > Memcache

redis和memcached的区别

2016-12-21 14:51 260 查看
最近发现一些误导性的文章,文章还是2016年发表的

摘文:

在Redis中,并不是所有的数据都一直存储在内存中的。这是和Memcached相比一个最大的区别。
当物理内存用完时,Redis可以将一些很久没用到的value交换到磁盘。
Redis只会缓存所有的key的信息,如果Redis发现内存的使用量超过了某一个阀值,将触发swap的操作,
Redis根据“swappability = age*log(size_in_memory)”计算出哪些key对应的value需要swap到磁盘。


真实情况:

redis2.6之后已经弃用VM模式,也就是说,数据都在内存

官网:https://redis.io/topics/virtual-memory

IMPORTANT NOTE: Redis VM is now deprecated. Redis 2.4 will be the latest Redis version featuring Virtual Memory
(but it also warns you that Virtual Memory usage is discouraged). We found that using VM has several disadvantages
and problems. In the future of Redis we want to simply provide the best in-memory database (but persistent on disk as usual) ever,
without considering at least for now the support for databases bigger than RAM.
Our future efforts are focused into providing scripting, cluster, and better persistence.


原文出自:http://blog.csdn.net/daiyudong2020/article/details/53784536

End;
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: