Hacker News new | past | comments | ask | show | jobs | submit login

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).



Mongo 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)


Memory 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 :)


I 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?



this 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


I'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?


Sluggy.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/ )


Yeah, 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.


The C++ API should work well as it is what we use in the database. The only issues is that it depends on boost, and any binary copy of the library depends on a specific version of boost. You may want to try compiling libmongoclient for your computer. If you still have issues, please post to our user list or ping us on irc.


I wanted to contact you guys but I'm running out of time this week.

I'll build the production version when I have some free time and then I could tell you. (I was working with v1.3.4)


What problems?


please post details on mongodb-user forums generally, it works




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: