我认为目前还不清楚,从文件或memcached读取内容更快吗?为什么?

最佳答案

Memcached速度更快,但是内存有限。 HDD很大,但与内存相比,I / O速度很慢。您应该将最热门的内容放到memcached 中,并将其他所有放到中以缓存文件
(或者手动把钱投入到更多的内存中,例如these guys :)

有关某些基准,请参见:Cache Performance Comparison (File, Memcached, Query Cache, APC)

理论上:

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

关于performance - 对于缓存,文件系统或Memcached,哪个更快/更好?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/3148076/

10-12 19:20
查看更多