couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Stockton" <cstock...@godaddy.com>
Subject Question regarding the performance of os_daemons
Date Fri, 26 Oct 2012 17:05:03 GMT
Hello,

I have a daemon that runs on our servers to perform various tasks, the
details aren't completely relevant but what I have noticed is that I see
about a 700% slow down when calling the daemon through couchdb.

Here is me calling a wget directly to our daemon:
wget http://<localip>:59831/_<ourhandler>/<our>/<path> 607,932,514

313M/s   in 1.9s

Now here is me doing it through couchdb's os daemon:
wget http://<localip>:59841/_<ourhandler>/<our>/<path> 607,932,514
41.0M/s   in 14s

My first thought when I see this kind of slowdown for a large file is a
small buffer size somewhere. I looked at the os_daemons.erl file here
[1] but I do not know erl at all, get lost quickly. Is it possible a
small read buffer of like 8k or less is pushing through the data? Do any
configuration options exist to increase this buffer size? Of course
buffer size is just a guess; if I am way off here please send me in any
other relevant direction. 

I understand this is a large amount of data, but the question remains;
why the such a dramatic slowdown? I understand the penalty involved with
proxying the reading through couchdb; but the slowdown should be much
much smaller.

Thanks for any information in advance,

-Chris

[1]
https://github.com/apache/couchdb/blob/master/src/couchdb/couch_os_daemons.erl

Mime
View raw message