X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 710A5535F8 for ; Fri, 1 Apr 2005 21:59:56 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 57350-05 for ; Fri, 1 Apr 2005 20:59:51 +0000 (GMT) Received: from rproxy.gmail.com (rproxy.gmail.com [64.233.170.201]) by svr1.postgresql.org (Postfix) with ESMTP id 3E74752A3A for ; Fri, 1 Apr 2005 21:59:50 +0100 (BST) Received: by rproxy.gmail.com with SMTP id a41so755706rng for ; Fri, 01 Apr 2005 12:59:52 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=cLTlLaR6jgipW05+hvgGhaq7f2mVDzRVDG5q4MlAu9oDYRS2IWaCtW3P4issgCAvQGB//ZE8hvVEYS26LmZTc/pU0+51CQl4r/RDX6tgb0FIUWCPRcrLZTQQdVzHiGkBXFNmlC6V5cwsRC8xrBPzYKmU8XRVDI68nK4w28cdDrY= Received: by 10.38.86.68 with SMTP id j68mr3221241rnb; Fri, 01 Apr 2005 12:59:52 -0800 (PST) Received: by 10.38.207.41 with HTTP; Fri, 1 Apr 2005 12:59:52 -0800 (PST) Message-ID: <59d991c4050401125956d6069d@mail.gmail.com> Date: Fri, 1 Apr 2005 15:59:52 -0500 From: Christopher Petrilli Reply-To: Christopher Petrilli To: jd@commandprompt.com Subject: Re: Sustained inserts per sec ... ? Cc: Tom Lane , "Marc G. Fournier" , pgsql-performance@postgresql.org In-Reply-To: <1112388818.3487.34.camel@jd2.commandprompt.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit References: <20050401140421.P18194@ganymede.hub.org> <59d991c4050401113857086517@mail.gmail.com> <28353.1112388128@sss.pgh.pa.us> <59d991c4050401124638c4ab5d@mail.gmail.com> <1112388818.3487.34.camel@jd2.commandprompt.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.266 tagged_above=0 required=5 tests=AWL, DNS_FROM_RFC_ABUSE, RCVD_BY_IP X-Spam-Level: X-Archive-Number: 200504/19 X-Sequence-Number: 11416 On Apr 1, 2005 3:53 PM, Joshua D. Drake wrote: > > > What seems to happen is it slams into a "wall" of some sort, the > > system goes into disk write frenzy (wait=90% CPU), and eventually > > recovers and starts running for a while at a more normal speed. What > > I need though, is to not have that wall happen. It is easier for me > > to accept a constant degredation of 5%, rather than a 99% degredation > > for short periods, as it can cause cascade problems in the system. > > Could this possibly be a checkpoint happening? > > Also how many checkpoint segments do you have? Changes to the postgresql.conf file from "default": maintenance_work_mem = 131072 fsync = false checkpoint_segments = 32 I set the checkpoint segments up until it no longer complained about them rolling over. That was the best "advice" I could find online. The maintenance_work_mem I upped to deal with indexes being updated constantly. And finally, since I'm willing to risk some loss, I turned fsync off, since the system is on a UPS (or will be in production) and carefully monitored. I did actually wonder about the checkpoint_segments being an issue, since it seems to me the more of them you have, the more you'd have to deal with when checkpointing, and so you might actually want to turn that number down to create a "smoother" behavior. Unfortunately, the alot advice for 'loading data' doesn't apply when you have a constant stream of load, rather than just sporadic. Any advice is more than appreciated. Chris -- | Christopher Petrilli | petrilli@gmail.com