14

Which has the better performance in low memory environments (sub 1GB) ?

I've used MongoDB in the past which seems to struggle memory-wise with a database of 250mb on a 512mb box, would the same be true of CouchDB ?

Imran
  • 581
  • 1
  • 6
  • 7

1 Answers1

19

CouchDB uses very little memory. It has been embedded in iOS and Android more-or-less unmodified—Erlang and all.

CouchDB works completely through file i/o, delegating caching to the operating system (filesystem cache). A typical situation on a CouchDB server is to see a very small amount of "used" memory, but a very large amount used for "cache." On a dedicated CouchDB server, that number is basically CouchDB's data; however, managing and reallocating those resources is up to the OS where it belongs.

In other words, CouchDB performs excellently in low-memory environments. In fact, embedded environments (e.g. mobile) are still very fast because the low-memory is somewhat balanced by the low-latency storage device (solid-state disk).

JasonSmith
  • 72,674
  • 22
  • 123
  • 149
  • 1
    Could you point to more resources on embedding it in a mobile? – Jesvin Jose Apr 26 '12 at 07:38
  • I would like to point out that, in my experience, it is true that CouchDB uses little memory while in normal operation. However, If you have many documents and some of them are very large, and you create a new view, then it will use a lot of RAM in order to create the new index. – gdelfino Aug 14 '18 at 20:19