对于缓存,文件系统或Memcached哪个更快/更好? [英] Which is faster/better for caching, File System or Memcached?
问题描述
我不认为这很清楚,从文件或memcached中读取内容是否更快?为什么?
Memcached速度更快,但内存有限。硬盘是巨大的,但I / O比内存慢。您应该将最热门的东西放到memcached 中,其他所有其他都可以放到缓存文件。 对于某些基准测试,请参阅:缓存性能比较(File,Memcached,Query Cache,APC) 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. For some benchmarks see: Cache Performance Comparison (File, Memcached, Query Cache, APC) In theory: http://www.cs.cornell.edu/projects/ladis2009/talks/dean-keynote-ladis2009.pdf 这篇关于对于缓存,文件系统或Memcached哪个更快/更好?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
并投入一些资金到更多的内存,如这些家伙:)
从内存中读取1 MB的内存250,000 ns
磁盘查找10,000,000 ns
(Or man up and invest some money into more memory like these guys :)Read 1 MB sequentially from memory 250,000 ns
Disk seek 10,000,000 ns