From user-return-6720-apmail-couchdb-user-archive=couchdb.apache.org@couchdb.apache.org Mon Oct 05 15:48:28 2009 Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 20337 invoked from network); 5 Oct 2009 15:48:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 5 Oct 2009 15:48:28 -0000 Received: (qmail 42724 invoked by uid 500); 5 Oct 2009 15:48:27 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 42637 invoked by uid 500); 5 Oct 2009 15:48:27 -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 42627 invoked by uid 99); 5 Oct 2009 15:48:27 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Oct 2009 15:48:27 +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 m.stollenga@gmail.com designates 209.85.219.209 as permitted sender) Received: from [209.85.219.209] (HELO mail-ew0-f209.google.com) (209.85.219.209) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Oct 2009 15:48:15 +0000 Received: by ewy5 with SMTP id 5so2112455ewy.12 for ; Mon, 05 Oct 2009 08:47:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:content-type:mime-version :subject:from:in-reply-to:date:content-transfer-encoding:message-id :references:to:x-mailer; bh=qwh7Xwk01tm3KyYKt1kPVTNGx+PdPhf0pMIYqNeMYPM=; b=Zo4BaPFq83DFYv4AUCrnkI4mzUC041H04ePdRynyKJcOa0nJ0EJCV7fJ1FLDdXS7R+ kzA7W+SkjiLPteECgwg4F4Ry9HLyNiIjWO4n6FLnfsFuH3GuHM/ciVuzkvWEoA0gNS2u GetUyzse/NHpd9oDFXiaJuoYF8kFAesswCzCI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; b=Fon+GibBIncT3YxfI+fy6EL1y4M+HPDFqUHEQXZVPiiScuNpT30mgSNEnXOi5vaBe5 XvXMHyI/1qsSsO6Nt0N/eX2MylBVAjwU8GnWi2NGW3sQDKcPfM0DGJ1QgCae6TxjNXeA Y1L+gTNBGq/cizrqdVAnd6BsQYemp865AlvAI= Received: by 10.211.131.40 with SMTP id i40mr3472520ebn.99.1254757675585; Mon, 05 Oct 2009 08:47:55 -0700 (PDT) Received: from ?192.168.1.127? (82-170-236-245.ip.telfort.nl [82.170.236.245]) by mx.google.com with ESMTPS id 10sm69970eyz.34.2009.10.05.08.47.54 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 05 Oct 2009 08:47:55 -0700 (PDT) Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes Mime-Version: 1.0 (Apple Message framework v1076) Subject: Re: slow deleting From: Marijn Stollenga In-Reply-To: Date: Mon, 5 Oct 2009 17:47:53 +0200 Content-Transfer-Encoding: 7bit Message-Id: <681954E3-10E5-46E5-B5FF-CEC01503BBA7@gmail.com> References: <0FAC432A-E38E-40F8-AC79-0FB007DBC14D@gmail.com> <59C1B7B6-61A8-4400-8913-020A484B30BF@gmail.com> <46aeb24f0910050814j74a4c4c9k4c0a314ebe1826@mail.gmail.com> <9C123F10-3630-4C09-B8A6-EC9C85F1B8DC@gmail.com> To: user@couchdb.apache.org X-Mailer: Apple Mail (2.1076) X-Virus-Checked: Checked by ClamAV on apache.org delayed_commits did the trick! Why does that help and more imporantly what are the side-effects. Does it take more time before the documents are up to date? On 5 okt 2009, at 17:35, Chris Anderson wrote: > On Mon, Oct 5, 2009 at 8:29 AM, Marijn Stollenga > wrote: >> When using a python script that calls curl to delete the objects, >> it remains >> equally slow. Curl does not have that header problem right? Other >> ideas? >> > > How many documents do you have? Does the deletion size vary with # > of docs? > > Try setting delayed_commits=true in your config and see if that helps. > > Chris > >> >> On 5 okt 2009, at 17:14, Robert Newson wrote: >> >>> I haven't checked but it's conceivable that couchdb4j (since it uses >>> httpclient) is issuing an "Expect: continue" header, and couchdb, >>> until very recently, treated that (incorrectly) case-sensitively, >>> causing an unnecessary wait for a timeout. >>> >>> A trace of http request/response headers for a single delete would >>> confirm or deny that hypothesis. >>> >>> B. >>> >>> On Mon, Oct 5, 2009 at 4:04 PM, Marijn Stollenga >> > >>> wrote: >>>> >>>> By the way, I use couchdb4j for interfacing with couchdb. I will >>>> try to >>>> find >>>> out if that is the problem. >>>> >>>> On 5 okt 2009, at 16:36, Paul Davis wrote: >>>> >>>>> Views won't affect deletion speeds at all. What version of >>>>> CouchDB on >>>>> what operating system are you using? Also, if possible you'll >>>>> want to >>>>> group as many deletes as possible into a single _bulk_docs call. >>>>> >>>>> Regardless of _bulk_docs, 4rps seems slow if you're on one of the >>>>> releases. If you're on an older version of trunk, try updating >>>>> to the >>>>> current version to see if that helps out. >>>>> >>>>> Paul Davis >>>>> >>>>> On Mon, Oct 5, 2009 at 9:58 AM, Marijn Stollenga >>>> > >>>>> wrote: >>>>>> >>>>>> Hello, >>>>>> I am new to this mailinglist. I am using CouchDB as backend to an >>>>>> online >>>>>> game. I notice that deleting documents is really slow (about 4 >>>>>> deletes >>>>>> per >>>>>> second). Is there any way to improve this speed? >>>>>> I use several views, do these views prohibit fast deletion? I >>>>>> added a >>>>>> view >>>>>> is use in the database. >>>>>> >>>>>> Thanks in advance, >>>>>> Marijn >>>>>> >>>>>> { >>>>>> "all": { >>>>>> "map": "function(doc) {if (doc.type == 'area'){emit(doc.name, >>>>>> doc._id);}}" >>>>>> }, >>>>>> "to_character": { >>>>>> "map": "function(doc) {if (doc.type == >>>>>> 'character'){emit(doc.location, >>>>>> doc.name);}}" >>>>>> }, >>>>>> "to_paths": { >>>>>> "map": "function(doc) {if (doc.type == 'path'){emit(doc.from, >>>>>> doc.to);}}" >>>>>> }, >>>>>> "path_to_area": { >>>>>> "map": "function(doc) {if (doc.type == 'path'){emit >>>>>> (doc.from + >>>>>> doc.name, doc.to);}}" >>>>>> } >>>>>> } >>>> >>>> >> >> > > > > -- > Chris Anderson > http://jchrisa.net > http://couch.io