NoSQL: A SO Answer About MongoDB Memory Usage

| | bookmark | email

A SO Answer About MongoDB Memory Usage

MongoDB isn't a write-to-disk application unlike SQL. So it writes to a fsync queue first which actually gets managed by the OS (this is fundamentally NoSQL here to not write straight to disk, "Eventually Consistent"), since MongoDB does no memory management of its own. The OS itself will then decide when paged in data should be removed using the LRU algorithm: http://en.wikipedia.org/wiki/Cache_algorithms#Least_Recently_Used Added ontop of this is that you must load a part of the _id btree each time you insert as well which is ever growing due to insertions. This means that actually if you do mass inserts in a short period of time you could end up loading more of the btree than you need to because the older section of the btree have not been seen as stale yet.

tags:mongodb,document database

via NoSQL databases