7 ms·
Just a question: mongo uses some kind of memory cache like memcached? or I need to implement it aside to get faster-faster performance? I'm thinking on a small
by pibefision 17y ago
Just a question: mongo uses some kind of memory cache like memcached? or I need to implement it aside to get faster-faster performance? I'm thinking on a small app (10K visitors a day).
- javery 17y agoMongo should be fast enough that you don't need to use memcached. It uses memory mapped files (which is also important to know since by default it only flushes data to disk every 60 seconds)
- antirez 17y agoMemory mapped files are nice, but once the mapped file starts to get much bigger than the physical memory pages the operating system can allocate, it starts to be asymptotically the same as accessing the filesystem from the point of view of latency, so indeed for datasets considerably bigger than RAM it is not possible to be as fast as memcached. Not a MongoDB limit, but a nature-imposed limit :)
- amix 17y agoI have had some bad experiences with memory mapped databases (particularly Berkeley DB and Tokyo Tyrant) - both these seem to be very greedy with IO writes when one starts to have lots of data and lots of updates. I think Reddit experienced a similar problem (as memcachedb is based on Berkeley DB). Does anybody know what Cassandra does?
- uggedal 17y agoTake a look at http://wiki.apache.org/cassandra/MemtableThresholds http://wiki.apache.org/cassandra/MemtableThresholds and http://wiki.apache.org/cassandra/ArchitectureOverview#Write_path http://wiki.apache.org/cassandra/ArchitectureOverview#Write_... for the specifics.
- dm_mongodb 17y agothis blog post talks a bit about a real world implementation and when they do and do not use memcached with mongodb: http://www.businessinsider.com/how-we-use-mongodb-2009-11 http://www.businessinsider.com/how-we-use-mongodb-2009-11
- ccarpenterg 17y agoI've tried MongoDB with the C++ API. I had a lot of problems in particular with the BSON objects and then switched to Memcached (+ MySQL). Do you think that the "production" version is working ok for all API's?
- pibefision 17y agoWhat problems?
- rit 17y agoSluggy.com has been using MongoDB in production (with Python as it's main API interface) since ~July '09. We haven't had a single problem with Mongo or API interfaces. This replaced MySQL + Memcache and was a MASSIVE difference in system load and performance. Your mileage may vary, but it's very, very rare that I can say I haven't had a single real problem with a third party package (especially one as complicated as a database-type system), more so with early adoption. (I'm still using Memcache for a few legacy pieces, but in general things I was having Beaker stuff in Memcache such as sessions and Pylons template caches are going into the Mongo Beaker plugin I wrote - http://bitbucket.org/bwmcadams/mongodb_beaker/ http://bitbucket.org/bwmcadams/mongodb_beaker/ )
- ccarpenterg 17y agoYeah, It works for me too with the Python API. But I have to develop some backend app with C++. Anyway I think I'll try again in the future.
- mathias_10gen 17y ago