couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Hirst <>
Subject Re: Surprisingly high CPU load
Date Wed, 30 Mar 2011 07:15:07 GMT
On Tue, 2011-03-29 at 14:26 +0100, Grauel, Moritz wrote:
> Hi,
> I am currently evaluating CouchDB. During my tests I have observed
> suprisingly high CPU load. I have installed a fresh CouchDB 1.0.2,
> created a DB and inserted one doc { 'hello':'world'}.
> Then I just fetch this single document as often as possible. My
> expectations are, that the network should be the bottleneck in this
> simple case.
> However the CPU Load of couchdb is very high. with 5 concurrect threads
> fetching the document I get around 90% cpu usage. Serving the json as
> a static file with an apache yields about twice as many requests as
> couchdb and only about 50% cpu load.
> I have repeated this test on linux in a vm, linux directly on the metal
> and osx and the results are more or less similar.
> I am very aware of the fact, that my 'benchmarks' are very rough...
> however I am concerned about the actual performance of couchdb when
> serving lots of requests.
> Why is CouchDB generating such a high load? Why isn't couch able to
> saturate the network?

I believe that the document is read from disk each time and re-encoded
from the on disk format into JSON. This process is presumably CPU
intensive enough that the CPU is the bottleneck not the network.

You might find this an interesting read

The performance improvements discussed in that bug sound extremely
appealing but the discussion has gone quiet which is a great shame. I'm
still hoping something comes of it.

Sophos Limited, The Pentagon, Abingdon Science Park, Abingdon, OX14 3YP, United Kingdom.
Company Reg No 2096520. VAT Reg No GB 991 2418 08.

View raw message