Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CouchDB vs MongoDB (memory utilization)

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 ?

like image 333
Imran Avatar asked Apr 25 '12 10:04

Imran


1 Answers

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

like image 95
JasonSmith Avatar answered Oct 19 '22 17:10

JasonSmith