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 ?

1 Answer 1

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

Sign up to request clarification or add additional context in comments.

2 Comments

Could you point to more resources on embedding it in a mobile?
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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.