对于缓存,文件系统或Memcached哪个更快/更好? [英] Which is faster/better for caching, File System or Memcached?

查看:168
本文介绍了对于缓存,文件系统或Memcached哪个更快/更好?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不认为这很清楚,从文件或memcached中读取内容是否更快?为什么?

解决方案

Memcached速度更快,但内存有限。硬盘是巨大的,但I / O比内存慢。您应该将最热门的东西放到memcached 中,其他所有其他都可以放到缓存文件
并投入一些资金到更多的内存,如这些家伙:)

对于某些基准测试,请参阅:缓存性能比较(File,Memcached,Query Cache,APC)

 从内存中读取1 MB的内存250,000 ns 
磁盘查找10,000,000 ns

http:// www .cs.cornell.edu / projects / ladis2009 / talks / dean-keynote-ladis2009.pdf


I don't think it's clear to me yet, is it faster to read things from a file or from memcached? Why?

解决方案

Memcached is faster, but the memory is limited. HDD is huge, but I/O is slow compared to memory. You should put the hottest things to memcached, and all the others can go to cache files.
(Or man up and invest some money into more memory like these guys :)

For some benchmarks see: Cache Performance Comparison (File, Memcached, Query Cache, APC)

In theory:

Read 1 MB sequentially from memory       250,000 ns
Disk seek                             10,000,000 ns

http://www.cs.cornell.edu/projects/ladis2009/talks/dean-keynote-ladis2009.pdf

这篇关于对于缓存,文件系统或Memcached哪个更快/更好?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆