On Nov 3, 2008, at 1:34, Jan Lehnardt wrote:

Another part is the Erlang to JSON conversion that is known to be slow-ish. I don't know which side of the conversion weighs more though. We are working with the Erlang community and developers to get a C-based JSON encoder into Erlang. Since building a view server is relatively straightforward, giving a Perl version a shot is probably worth it.

You are right that it's the Erlang side that's slow. beam.smp uses ~100% CPU while couchjs just uses 10-15% (depending on the complexity of the map function).

Even just inserting documents (a few KB each) is going sloowly. Inserting 2000 new documents is taking about 12 seconds on 2.5GHz of whatever Intel's new server CPUs are called.

Is that right?  I'm using SVN as of a few days ago.

(RAID 10 on 14 15k SAS disks, many more GB ram than the dataset etc - as far as I can tell the workload is entirely CPU bound - there are 8 CPU cores, but as I understand it CouchDB basically only uses more than one when updating views, and even then it's limited by the main process being CPU bound).

Which Erlang version are you running. R11B-x is known for causing view-build slowness.
R12B-3 and R12B-4 are good.

I think I'm using R12B-3.  The RPM I am using is erlang-R12B-3.3.el5.


 - ask

Reply via email to