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 132789EF5 for ; Fri, 23 Mar 2012 11:57:34 +0000 (UTC) Received: (qmail 27924 invoked by uid 500); 23 Mar 2012 11:57:32 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 27896 invoked by uid 500); 23 Mar 2012 11:57:32 -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 27888 invoked by uid 99); 23 Mar 2012 11:57:32 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Mar 2012 11:57:32 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_NEUTRAL,TO_NO_BRKTS_PCNT X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [209.85.212.52] (HELO mail-vb0-f52.google.com) (209.85.212.52) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Mar 2012 11:57:26 +0000 Received: by vbzb23 with SMTP id b23so2068921vbz.11 for ; Fri, 23 Mar 2012 04:57:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:x-gm-message-state; bh=nAgWJy4VGJVigYACJADozjCwqMx8+zI3uW54iUzivDg=; b=Y29Jd1w893DW4v9Q9MObr2p50e2j4qWyaBoaWOfnmyR7RxNc8I/bdpyTAuoWIAZpSX VkJ9wK3R9lf9VufuLvWCfuI47j8BikRcnJ2J+9wuJeVUvNSmUBMgxRNMHjsk2WDpOoLo 0Tna2UF1p4DlB20uZhqkFwGr0Rp/HOgUAP6ipcZS1n4K74VBy6u3y7sv+tiRS1YD6csG 6Dik/4+4M1AzdMPxKzyqSyqpHizffm5/POk9dc/SkFxv2YZ3gcmxfRwRaAiHEwMT3cLZ 1s27RiQT5cWCZn2qwQfijaEuZpclRnl4RkNrYYcdt+hpDlmA/UG4QirOjP3Q83mmUsL+ v4iA== Received: by 10.220.106.208 with SMTP id y16mr5372413vco.3.1332503825536; Fri, 23 Mar 2012 04:57:05 -0700 (PDT) MIME-Version: 1.0 Received: by 10.220.156.212 with HTTP; Fri, 23 Mar 2012 04:56:44 -0700 (PDT) In-Reply-To: References: From: Jason Smith Date: Fri, 23 Mar 2012 11:56:44 +0000 Message-ID: Subject: Re: Why are reads from CouchDB so slow? (1.5MB/s or thereabouts) To: user@couchdb.apache.org Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQkBLN93E9O7iy8bkBrs3SgwvOu0kC5+evf6U/dUQ2P/HTO8jIfI+I/sd2v8xQtheDbUEsgx X-Virus-Checked: Checked by ClamAV on apache.org CouchDB verifies that the document contents match a checksum which does impose computation and codec overhead, yes. Considering that CouchDB stores multiple sorted indices to the documents in a database which is itself a filesystem file, in a safe append-only format, how would you justify an expectation of static Nginx performance? Surely CouchDB must open the file (right there you have tied Nginx at best) and then seek through its metadata to fetch the doc. Note, my disagreement with you is not fundamental, just of degree. Surely it is fair to give CouchDB some elbow room to work, to pay for its benefits? Back to document comprehension, CouchDB does do that and this is a huge opportunity for improvement. I believe Filipe has indeed proposed something much like you describe: store the utf-8 JSON directly on the disk. I'm excited that this conversation can paint a more clear picture of what we expect from CouchDB, to find a speed at which we could say, "this is slower than Brand X, but it's worth it." On Fri, Mar 23, 2012 at 11:41 AM, Jonathan Williamson wrote: > As I'm requesting the documents in the exact format I submitted them > (with no transformations or extra information) I'd expect something > not far off a static file request from Nginx. As far as I can tell the > .couch files aren't compressed (though that wouldn't cause such slow > performance on an i5 anyway) and appear to contain the original > documents almost "as is". > > The other side effect is that while fetching the documents the CPU > usages rises to 100% which suggests, I guess, that CouchDB is reading, > deserialising, serialising, and then streaming the document. But it > doesn't seem like that should be necessary really? > > On Fri, Mar 23, 2012 at 11:16 AM, Jason Smith wrote: >> Hi, Jonathan. >> >> Can we start by identifying how fast you think **is** reasonable. What >> speeds were you expecting? And on what grounds do you base that >> expectation? >> >> (For example, perhaps connecting and fetching one row from MySQL?) -- Iris Couch