Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 63736 invoked from network); 21 Jul 2010 16:17:01 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 21 Jul 2010 16:17:01 -0000 Received: (qmail 35537 invoked by uid 500); 21 Jul 2010 16:16:59 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 35446 invoked by uid 500); 21 Jul 2010 16:16:59 -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 35438 invoked by uid 99); 21 Jul 2010 16:16:59 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Jul 2010 16:16:59 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of bra@fsn.hu designates 195.228.252.137 as permitted sender) Received: from [195.228.252.137] (HELO people.fsn.hu) (195.228.252.137) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Jul 2010 16:16:49 +0000 Received: by people.fsn.hu (Postfix, from userid 1001) id 23C5C395EEE; Wed, 21 Jul 2010 18:16:28 +0200 (CEST) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000044, version=1.2.2 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MF-ACE0E1EA [pR: 7.8373] X-CRM114-CacheID: sfid-20100721_18162_8F48C4F1 X-CRM114-Status: Good ( pR: 7.8373 ) X-DSPAM-Result: Whitelisted X-DSPAM-Processed: Wed Jul 21 18:16:28 2010 X-DSPAM-Confidence: 0.6522 X-DSPAM-Probability: 0.0000 X-DSPAM-Signature: 4c471d5b43831282819216 X-DSPAM-Factors: 27, From*Attila Nagy , 0.00130, FreeBSD, 0.00265, 0), 0.00655, core, 0.00739, I+haven't, 0.01000, 467, 0.99000, 109, 0.99000, errors, 0.01000, errors, 0.01000, threads, 0.01000, threads, 0.01000, slow, 0.01000, seems+to, 0.01000, connection, 0.01000, connection, 0.01000, consists, 0.01000, module, 0.01000, module, 0.01000, I'm+trying, 0.01000, enabled, 0.01000, 0+0), 0.01000, could+do, 0.01000, Jul+2010, 0.99000, Jul+2010, 0.99000, (and, 0.01000, (and, 0.01000, X-Spambayes-Classification: ham; 0.00 Received: from japan.t-online.private (japan.t-online.co.hu [195.228.243.99]) by people.fsn.hu (Postfix) with ESMTPSA id C8818395EE2 for ; Wed, 21 Jul 2010 18:16:23 +0200 (CEST) Message-ID: <4C471D53.9040100@fsn.hu> Date: Wed, 21 Jul 2010 18:16:19 +0200 From: Attila Nagy User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.1.10) Gecko/20100629 Thunderbird/3.0.5 MIME-Version: 1.0 To: "user@couchdb.apache.org" Subject: CouchDB with SMP HiPE? (and a benchmark with UP HiPE) Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hi, I'm trying to speed up CouchDB (1.0.0) a little (sadly it's too slow for a task currently) with HiPE. What I do is: setenv ERLC_FLAGS '-smp +native' and compiling seems to be OK: /usr/local/bin/erlc -smp +native mochifmt.erl /usr/local/bin/erlc -smp +native mochifmt_records.erl /usr/local/bin/erlc -smp +native mochifmt_std.erl /usr/local/bin/erlc -smp +native mochihex.erl /usr/local/bin/erlc -smp +native mochijson.erl /usr/local/bin/erlc -smp +native mochijson2.erl /usr/local/bin/erlc -smp +native mochinum.erl but when starting CouchDB, I get a lot of lines like these: =INFO REPORT==== 21-Jul-2010::15:23:13 === Warning: not loading native code for module mochiweb_http: it was compiled for an incompatible runtime system; please regenerate native code for this runtime system =INFO REPORT==== 21-Jul-2010::15:23:13 === Warning: not loading native code for module mochiweb_socket_server: it was compiled for an incompatible runtime system; please regenerate native code for this runtime system I start erl with the options: ERL_START_OPTIONS="-smp enable -sasl errlog_type error +K true +A 4" Any ideas? BTW, I haven't got this error with SMP disabled, so I could do some benchmarks. The setup consists of three nodes, I write data into A and replicate the DB to B and C. Sadly these two lags far behind the written node (see my previous e-mail)... I use python and open a new HTTP session on every write concurrently (from twisted) as fast as the CPU allows. Results: SMP disabled: 467 writes per second (WPS), 0 connection errors SMP enabled: 493 WPS, 109 connection errors setenv ERLC_FLAGS '+native' (and SMP disabled): 472 WPS, 0 connection errors setenv ERLC_FLAGS '+native \+\{hipe,\[o3\]\}' (and SMP disabled): 472 WPS, 0 connection errors setenv ERLC_FLAGS '+native \+\{hipe,\[o3,pp_beam,pp_icode,pp_rtl,pp_native\]\}' (and SMP disabled): 477 WPS, 0 connection errors setenv ERLC_FLAGS '+native \+\{hipe,\[o3,pp_beam,pp_icode,pp_rtl,pp_native\]\}'; ERL_START_OPTIONS="-smp enable -sasl errlog_type error +K true" (no SMP, no threading): 502 WPS, 0 connection errors Conclusion (for this task on this OS/machine of course): disabling SMP and threads give the best performance boost (this is a dual core machine), HiPE gains only a very small amount of performance increasement (if I'm correct). Using SMP increases performance, but not that much like disabling threads, but it introduces connection errors (maybe it's FreeBSD specific). This test has utilized only one database BTW.