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 3BBD39977 for ; Tue, 22 May 2012 09:54:38 +0000 (UTC) Received: (qmail 76770 invoked by uid 500); 22 May 2012 09:54:36 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 76336 invoked by uid 500); 22 May 2012 09:54:31 -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 76308 invoked by uid 99); 22 May 2012 09:54:30 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 May 2012 09:54:30 +0000 X-ASF-Spam-Status: No, hits=3.6 required=5.0 tests=FROM_LOCAL_NOVOWEL,HK_RANDOM_ENVFROM,HK_RANDOM_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of cgsmcmlxxv@gmail.com designates 209.85.216.45 as permitted sender) Received: from [209.85.216.45] (HELO mail-qa0-f45.google.com) (209.85.216.45) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 May 2012 09:54:23 +0000 Received: by qaeb19 with SMTP id b19so2506982qae.11 for ; Tue, 22 May 2012 02:54:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=yEraGG0YCpnKJG7OYQ4SjuQhIAuC/0+wLUO37bTyew8=; b=a6TOWwjfZvLcdZ61hnOz9YYvG00w2/qYaMHGUoHnUX+6qks9WaYsYzWQ+aoiR+EM23 MvL+KfHa4WIFpk1qqCanJquT4hGfMsf2NkctPFabX7RPK0EejH/hI0OOx66YkTKfjEy4 Bkb22do+YcwIQkIe4Q07KGUk1Qmk5F+u7pyfdjb+4P1ncY7tqkLaiobgXaC1zQ4CbM7f GtAIZS+5ems/J9uqtFoTt3WdkaqxYD59JxtI5ybVZcCGz7mUDUyWBMIo1FV2vZrzYvmA Ezsp3s0Cmb+2FBtaPGtkMEcYbqpIPSBfRnUOMmpiGZ5tP3vXWarwZNpHwDYcHZ54DhtZ IRBQ== MIME-Version: 1.0 Received: by 10.224.189.19 with SMTP id dc19mr43416131qab.76.1337680443163; Tue, 22 May 2012 02:54:03 -0700 (PDT) Received: by 10.229.49.142 with HTTP; Tue, 22 May 2012 02:54:03 -0700 (PDT) In-Reply-To: References: Date: Tue, 22 May 2012 11:54:03 +0200 Message-ID: Subject: Re: why is couch stealing all my resources? From: CGS To: user@couchdb.apache.org Content-Type: multipart/alternative; boundary=20cf3033464da342c204c09cff30 --20cf3033464da342c204c09cff30 Content-Type: text/plain; charset=ISO-8859-1 Hi Cory, There are few general points I would mention: 1. Try to not allow the traffic to increase more than your harddisk capabilities. That is, in case you notice your traffic is becoming too high for read/write capabilities of your harddisk, you may want to consider adding a gateway and more machines to process your data (or at least more HDD units for parallel processing of your data). 2. Try to avoid oversized databases. That means, it is preferred for you to create a new database every time your database reaches a certain size. This recommendation is based on parallel build of your views which, on multicore CPU's (or multiple CPU's), will use better your computing element(s). Also, the search, insertion and so on will perform better in the case of smaller databases. These points can be easily implemented by using shards in BigCouch, for example. If you prefer something more dedicated, you can set a gateway which should manage (by using round-robin, tree or whatever other algorithm) the users connections. But this last idea requires you to implement it. There are other recommendations as well, but I stop to these two because these are the two that users usually forget to take into account when they design their projects based on CouchDB. Of course, your problem may have some other sources, so, more info (OS, CPU and so on) will help in finding those sources and to add your problem to the common knowledge. CGS PS: As you can notice, I didn't give any numbers here. That's because everything depends on your systems. On Tue, May 22, 2012 at 8:34 AM, Cory Zue wrote: > Hi folks, > > I have a production app deployed on couchdb and it's been going great for a > while. However recently it has started to hog lots of the CPU cycles on our > machine. Also, view rebuilds seem to be happening at a crawl (maybe just > because the machine is taxed). > > We're on couch 1.0.1. The database is about 12 GB. We recently ran > compaction for the first time. Site traffic has steadily increased > recently, but not to the point where I would expect it to have such a large > affect on performance. > > Is there any way to see why couch is taking so much resources? I had > thought to temporarily switch the logging to debug mode and see if there's > anything interesting there, but curious what other tools/techniques people > have used to profile couch. > > Any general advice on this problem would also be useful. > > thanks, > Cory > --20cf3033464da342c204c09cff30--