couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sam Bisbee <...@sbisbee.com>
Subject Re: Limit on the number of databases?
Date Thu, 26 May 2011 15:15:29 GMT
On Thu, May 26, 2011 at 6:22 AM, Glenn Bech <glenn.bech@gmail.com> wrote:
> Hi,
>
> I just want to ask if there are limits on the number of databases in Couch.
> I am playing around with embeded Couch on Android and are thinking in the
> line of having
> one database per user, and use replication to push data from the client to
> the server. This will provde for an Excellent "offline" user experience.
>
> This will of course not work if Couch does not handle unlimited datbases
> very well performance- or otherwise.
>
> Does this sound like a feasable design solution?
>
> Regards,
>
> Glenn
>

I have been looking into this recently with an application design that
would use thousands of databases - tens to hundreds of thousands after
a year of usage. From what I have found there are a few considerations
to weigh...

  - Since each database is a file, you are going to need one file
descriptor per active database. CouchDB and erlang have their own
internal maximums that you can play with. Once their max is reached,
CouchDB starts to close the oldest file descriptors.

  - Since CouchDB closes file descriptors, if you have a bunch of
active databases you run the risk of slowing down your machine.
Increasing the number of open file descriptors is not always the best
solution, because you could start to see OS level performance issues.

  - Don't forget your OS's max open files. Take a look at ulimit or
pam if you're on a *nix machine.

  - On a non-performance note, you can't do map/reduce across
databases. If you plan on referencing between them or combining data,
then you're probably going to have a index database that some client
code puts its results into.

Cheers,

-- 
Sam Bisbee
www.sbisbee.com

Mime
View raw message