Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 12002 invoked from network); 28 Jul 2010 09:26:56 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 28 Jul 2010 09:26:56 -0000 Received: (qmail 72106 invoked by uid 500); 28 Jul 2010 09:26:55 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 71810 invoked by uid 500); 28 Jul 2010 09:26:52 -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 71802 invoked by uid 99); 28 Jul 2010 09:26:51 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Jul 2010 09:26:51 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of sivang@gmail.com designates 209.85.160.180 as permitted sender) Received: from [209.85.160.180] (HELO mail-gy0-f180.google.com) (209.85.160.180) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Jul 2010 09:26:45 +0000 Received: by gye5 with SMTP id 5so2757684gye.11 for ; Wed, 28 Jul 2010 02:26:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:content-type; bh=xFa6s1hQixu80hAoh4bQhqf0JK3qlT/+ARKa4IFepFg=; b=UQ76nTTEmxANSDHgeYq6/+2V3psciDXf3Kpz5+G6URz0kjrvvhRWJgv8++k0IzPFO9 B4ORRvyX2XKWDgKO0owasViqTS3Q2xxhyEg5AOWNpFfzEaRJ2yPl7PmMDV35fhYyu8MC As4zMhyI3CM+ExzvFAxBJJzTSCuVfBVhzENpA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; b=M30rJMwHd2fSk52Vg/+5kfUEtMhMl3Eknx7CFG8pJoyn8iZsEvM9HLLuuoHdbDYIHj opEpNR1W99caUlram5VkpelQmz4oN2LFajP+NK9GabelLpnhVNKRJ81q5UHXGqDy01rP 8PuaMsa/OstkUG+AhqXTN2pzF/ECqSBijdWx8= MIME-Version: 1.0 Received: by 10.150.48.7 with SMTP id v7mr4075711ybv.30.1280309184471; Wed, 28 Jul 2010 02:26:24 -0700 (PDT) Sender: sivang@gmail.com Received: by 10.231.177.194 with HTTP; Wed, 28 Jul 2010 02:26:24 -0700 (PDT) In-Reply-To: References: Date: Wed, 28 Jul 2010 12:26:24 +0300 X-Google-Sender-Auth: EuFxpjopadchAv9efkyGwXeaWSs Message-ID: Subject: Re: beam CPU hog From: Sivan Greenberg To: user@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 On Wed, Jul 28, 2010 at 12:02 PM, Randall Leeds wrote: > 1) Spinning up a replication means a bunch of HTTP requests. The fact > that the requests are local only means you're not seeing network > latency and your cpu is more pinned than in the real world. You could > try creating 100 documents first and causing conflicts on all of them > in a single replication or replace your urls with bare db names (i.e., > just 'session_store_rep' and 'session_store') to get local replication > which bypasses the HTTP layer. The latter option will also reduce the > amount of json encoding/decoding you're doing. I'm actually in wish to experience closest to real world things, so bypassing it feels to me as running the test less rigorously. Please correct me if I'm wrong as there's a chance I didn't get to the bottom of this still. I did change the target to not use http as this is how it will be in the real deployment, thanks for noticing that :) > > 2) Give us more info about your problem with 'load'. You really > shouldn't care about the cpu load. How long your test takes is much > more important. If you're getting a decent number of operations/second > and your cpu is pinned you should be thrilled. The problem is that the servers designated to host CouchDB are very strong servers (8Gigs of RAM, losts of CPU and cores) , but still do a couple of others things like http server and possibly a couple more services. So when CPU is hogged , performance of web apps is effected. However- I would not care too much about this to start with if CouchDB's performance would actually provide the result- the idea about this is to have the conflict resolved in real or near real time manner, to be as coherent as possible with the winning doc or latest version of a shopping cart. So right now, when the db is a bit big (less then 1G still) operations take long such that the expected outcome of conflicts cleared (e.g. _conflicts goes away form the doc obj when asked for with conflict=true) does not happen, when simulating a user action triggering fetching his session details, he gets the wrong version... For the record, no I can't use sticky sessions :) (this has gone up once or twice) > Hoping this helps you out :) This is a start :-) Many thanks so far! Sivan