couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pete Vander Giessen <>
Subject Slow db w/ lots of replications
Date Thu, 19 Jan 2012 06:09:43 GMT
Hi All,

We're running couch vers. 1.0.x, with a few patches applied to bring
in some newer features (such as oauth), and we're getting slow
performance under the circumstances outlined below, even after
following the advice on "Performance" on the wiki. Here's what we have
setup, and here's what we're seeing:

We have one "master" server, with a lot of databases, and a bunch of
clients attached to it, each running their own copy of couch. The
clients setup push and pull replications with the master for 1 or 2 of
the databases. There's a fair amount of traffic in the replications,
with some documents that get updated every few seconds or minutes
(we're working on reducing the number of documents that receive such
frequent updates). The clients run compaction once every half hour or

With 6-8 clients attached to the master, each client replicating from
2 databases, everything is hunky dory. Data replicates quickly across
our little cloud, and futon on the master server is responsive. Once
we get up to 10 clients, things begin to bog down. When we approach 20
clients, futon is near unusable, and clients get updates quite slowly.
Simply writing a file directly to a database on the master server can
take seconds to minutes.

I've increased the number of internal erlang processes, increased the
worker threads, and increased the number http ports and pipeline the
master has available for replications (following the formula given on
the wiki). The machine is not running out of memory or disk, though it
uses a lot of CPU (never quite maxes out).

The weird thing is that some of the bottleneck seems to happen at a
per database level. If I hook 10 clients up to one database, and 10
clients up to another database, I don't see the same slowdown as I see
when I hook 20 clients up to one database.

I'm not seeing errors in our logs.

Are there any per-database bottlenecks that I can address? Does
anybody have Performance tweaking advice outside of the stuff on the

Thank you,


"The problem with Internet quotations is that many are not genuine."
~ Abraham Lincoln

View raw message