From user-return-22634-apmail-couchdb-user-archive=couchdb.apache.org@couchdb.apache.org Fri Oct 26 17:05:36 2012 Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 29A11D737 for ; Fri, 26 Oct 2012 17:05:36 +0000 (UTC) Received: (qmail 73530 invoked by uid 500); 26 Oct 2012 17:05:34 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 73378 invoked by uid 500); 26 Oct 2012 17:05:34 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 73342 invoked by uid 99); 26 Oct 2012 17:05:32 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 Oct 2012 17:05:32 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of cstockton@godaddy.com designates 208.109.78.21 as permitted sender) Received: from [208.109.78.21] (HELO smtpoutwbe09.prod.mesa1.secureserver.net) (208.109.78.21) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 Oct 2012 17:05:26 +0000 Received: from gem-wbe34.prod.mesa1.secureserver.net ([64.202.189.30]) by smtpoutwbe09.prod.mesa1.secureserver.net with bizsmtp id Ft541k0020fnl9L01t54WM; Fri, 26 Oct 2012 10:05:04 -0700 Received: (qmail 2381 invoked by uid 99); 26 Oct 2012 17:05:04 -0000 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" X-Originating-IP: 172.16.173.175 User-Agent: Workspace Webmail 5.6.26 Message-Id: <20121026100503.606199c7bd86870792dc193fa4122d82.2c3d5aa0aa.wbe@email00.secureserver.net> From: "Chris Stockton" To: user@couchdb.apache.org Subject: Question regarding the performance of =?UTF-8?Q?os=5Fdaemons?= Date: Fri, 26 Oct 2012 10:05:03 -0700 Mime-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org Hello,=0A=0AI have a daemon that runs on our servers to perform various tas= ks, the=0Adetails aren't completely relevant but what I have noticed is tha= t I see=0Aabout a 700% slow down when calling the daemon through couchdb.= =0A=0AHere is me calling a wget directly to our daemon:=0Awget http://:59831/_// 607,932,514 =0A313M/s in 1.9s=0A=0A= Now here is me doing it through couchdb's os daemon:=0Awget http://:59841/_// 607,932,514=0A41.0M/s in 14s=0A=0AMy f= irst thought when I see this kind of slowdown for a large file is a=0Asmall= buffer size somewhere. I looked at the os_daemons.erl file here=0A[1] but = I do not know erl at all, get lost quickly. Is it possible a=0Asmall read b= uffer of like 8k or less is pushing through the data? Do any=0Aconfiguratio= n options exist to increase this buffer size? Of course=0Abuffer size is ju= st a guess; if I am way off here please send me in any=0Aother relevant dir= ection. =0A=0AI understand this is a large amount of data, but the question= remains;=0Awhy the such a dramatic slowdown? I understand the penalty invo= lved with=0Aproxying the reading through couchdb; but the slowdown should b= e much=0Amuch smaller.=0A=0AThanks for any information in advance,=0A=0A-Ch= ris=0A=0A[1]=0Ahttps://github.com/apache/couchdb/blob/master/src/couchdb/co= uch_os_daemons.erl