On Sun, Jan 25, 2009 at 10:55 AM, Jeremy Dunck <[email protected]> wrote: > > On Sun, Jan 25, 2009 at 9:51 AM, Xaxo <[email protected]> wrote: >> On Jan 23, 4:21 pm, Jeremy Dunck <[email protected]> wrote: >>> In general, file-based makes sense if: >>> * memory is at a premium >>> * latency to other nodes is high >>> * shared access to specific keys is easily partitioned to nodes >>> * disk bandwidth dwarfs cache bandwidth >> ...... >>> If you have a lot of writes, disk is going to bottleneck before >>> memory/network. >> >> file-based caching != disk based caching >> > > Well, OK, if you want to go that far, you could also use mogilefs or > HDFS or many other not-really-files approaches. If you're using > tmpfs, I guess that shows memory is not short-- you still have to > serialize bits, so why not run a single memcached node local?
No need to get into tmpfs. The OS will already cache as much of the files in RAM as it can, and things like BerkeleyDB manage their own shared RAM cache. Running a single memcached node locally is significantly slower than BerkeleyDB or mmap'ed files. The communication overhead just kills it compared to in-process calls with an efficient system. The advantage of memcached is in sharing between machines. - Perrin
