<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    西沙璞玉
    愛不容易
    posts - 0,comments - 4,trackbacks - 0

    這兩年Redis火得可以,Redis也常常被當作Memcached的挑戰者被提到桌面上來。關于Redis與Memcached的比較更是比比皆是。然而,Redis真的在功能、性能以及內存使用效率上都超越了Memcached嗎?

    下面內容來自Redis作者在stackoverflow上的一個回答,對應的問題是《Is memcached a dinosaur in comparison to Redis?》(相比Redis,Memcached真的過時了嗎?)

    • You should not care too much about  performances. Redis is faster per core with small values, but memcached  is able to use multiple cores with a single executable and TCP port  without help from the client. Also memcached is faster with big values  in the order of 100k. Redis recently improved a lot about big values  (unstable branch) but still memcached is faster in this use case. The  point here is: nor one or the other will likely going to be your  bottleneck for the query-per-second they can deliver.
    • 沒有必要過多的關心性能,因為二者的性能都已經足夠高了。由于Redis只使用單核,而Memcached可以使用多核,所以在比較上,平均每一 個核上Redis在存儲小數據時比Memcached性能更高。而在100k以上的數據中,Memcached性能要高于Redis,雖然Redis最近 也在存儲大數據的性能上進行優化,但是比起Memcached,還是稍有遜色。說了這么多,結論是,無論你使用哪一個,每秒處理請求的次數都不會成為瓶 頸。(比如瓶頸可能會在網卡)
    • You should care about memory usage.  For simple key-value pairs memcached is more memory efficient. If you  use Redis hashes, Redis is more memory efficient. Depends on the use  case.
    • 如果要說內存使用效率,使用簡單的key-value存儲的話,Memcached的內存利用率更高,而如果Redis采用hash結構來做key-value存儲,由于其組合式的壓縮,其內存利用率會高于Memcached。當然,這和你的應用場景和數據特性有關。
    • You should care about persistence and  replication, two features only available in Redis. Even if your goal is  to build a cache it helps that after an upgrade or a reboot your data  are still there.
    • 如果你對數據持久化和數據同步有所要求,那么推薦你選擇Redis,因為這兩個特性Memcached都不具備。即使你只是希望在升級或者重啟系統后緩存數據不會丟失,選擇Redis也是明智的。
    • You should care about the kind of  operations you need. In Redis there are a lot of complex operations,  even just considering the caching use case, you often can do a lot more  in a single operation, without requiring data to be processed client  side (a lot of I/O is sometimes needed). This operations are often as  fast as plain GET and SET. So if you don’t need just GEt/SET but more  complex things Redis can help a lot (think at timeline caching).
    • 當然,最后還得說到你的具體應用需求。Redis相比Memcached來說,擁有更多的數據結構和并支持更豐富的數據操作,通常在 Memcached里,你需要將數據拿到客戶端來進行類似的修改再set回去。這大大增加了網絡IO的次數和數據體積。在Redis中,這些復雜的操作通 常和一般的GET/SET一樣高效。所以,如果你需要緩存能夠支持更復雜的結構和操作,那么Redis會是不錯的選擇。

    來源:Is memcached a dinosaur in comparison to Redis?(其他人的回答同樣值得一看)

    posted on 2012-03-27 18:00 @趙 閱讀(134) 評論(0)  編輯  收藏

    只有注冊用戶登錄后才能發表評論。


    網站導航:
     
    哥哥最近不是很忙
    主站蜘蛛池模板: 亚洲精品动漫免费二区| 三年片免费高清版 | 97超高清在线观看免费视频| 97无码免费人妻超级碰碰夜夜| 亚洲婷婷天堂在线综合| 久久免费动漫品精老司机| 亚洲国产精品国自产电影| 四虎国产成人永久精品免费| 久久精品国产亚洲AV无码偷窥| 51在线视频免费观看视频| ass亚洲**毛茸茸pics| 毛片免费观看的视频在线| 亚洲av无码有乱码在线观看| 国产成人免费a在线资源| 免费人成大片在线观看播放| 国产亚洲色婷婷久久99精品91| 免费无码作爱视频| 亚洲AV福利天堂一区二区三| 四虎成年永久免费网站| 中文有码亚洲制服av片| 国产v片免费播放| 黄床大片免费30分钟国产精品| 亚洲国产精品VA在线观看麻豆 | 成年人在线免费观看| 亚洲日韩精品A∨片无码加勒比| 国产免费拔擦拔擦8x| 一边摸一边桶一边脱免费视频| 国产精品亚洲A∨天堂不卡| 最近中文字幕高清免费中文字幕mv| 亚洲另类视频在线观看| 日韩在线a视频免费播放| 国产免费MV大全视频网站| 亚洲四虎永久在线播放| 成人免费视频一区| 国产精品无码永久免费888| 久久青青草原亚洲av无码app| 国产成人免费一区二区三区| 久久成人免费电影| 亚洲成AV人片在WWW| 亚洲av无码国产精品夜色午夜| 色吊丝最新永久免费观看网站|