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 189F0528C3 for ; Tue, 19 Jul 2005 14:14:09 -0300 (ADT) 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 89409-09 for ; Tue, 19 Jul 2005 17:14:03 +0000 (GMT) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.202]) by svr1.postgresql.org (Postfix) with ESMTP id E60D352863 for ; Tue, 19 Jul 2005 14:13:59 -0300 (ADT) Received: by wproxy.gmail.com with SMTP id i28so1240542wra for ; Tue, 19 Jul 2005 10:14:00 -0700 (PDT) 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:content-disposition:references; b=RK6fYl2KXT+VFBt9MqGccMbt3z5NFXUzchXFqXnIx2SwhFbAtAIvIQxg5Fxqag2Xtn2wzWQGNcY99rigGZWdXZFLcUjCYvm+wwgwkOPfl/zrflCe9Hi6cRm1gMoH/Z1wX2bxtSQBEpPvLavzoXOfoMFsy/HlLk6wWZNMJQpN2yg= Received: by 10.54.37.71 with SMTP id k71mr804351wrk; Tue, 19 Jul 2005 10:13:05 -0700 (PDT) Received: by 10.54.120.11 with HTTP; Tue, 19 Jul 2005 10:13:05 -0700 (PDT) Message-ID: <59d991c405071910133e28031a@mail.gmail.com> Date: Tue, 19 Jul 2005 13:13:05 -0400 From: Christopher Petrilli Reply-To: Christopher Petrilli To: Tom Lane Subject: Re: Impact of checkpoint_segments under continual load conditions Cc: PFC , Vivek Khera , pgsql-performance@postgresql.org In-Reply-To: <7436.1121792725@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <59d991c4050717100874c08a86@mail.gmail.com> <16794.1121718743@sss.pgh.pa.us> <59d991c405071907482bb0689b@mail.gmail.com> <59d991c4050719084460b376f1@mail.gmail.com> <4541.1121788647@sss.pgh.pa.us> <59d991c40507190930244ba9bb@mail.gmail.com> <7224.1121791328@sss.pgh.pa.us> <59d991c4050719095440cd3de5@mail.gmail.com> <7436.1121792725@sss.pgh.pa.us> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.15 tagged_above=0 required=5 tests=AWL, RCVD_BY_IP X-Spam-Level: X-Archive-Number: 200507/294 X-Sequence-Number: 13535 On 7/19/05, Tom Lane wrote: > Christopher Petrilli writes: > > As I'm doing this, I'm noticing something *VERY* disturbing to me: > > postmaster backend: 20.3% CPU > > psql frontend: 61.2% CPU >=20 > > WTF? The only thing going through the front end is the COPY command, > > and it's sent to the backend to read from a file? >=20 > Are you sure the backend is reading directly from the file, and not > through psql? (\copy, or COPY FROM STDIN, would go through psql.) The exact command is: COPY test (columnlist...) FROM '/tmp/loadfile'; =20 > But even so that seems awfully high, considering how little work psql > has to do compared to the backend. Has anyone ever profiled psql doing > this sort of thing? I know I've spent all my time looking at the > backend ... Linux 2.6, ext3, data=3Dwriteback It's flipped now (stil lrunning), and it's 48% postmaster, 36% psql, but anything more than 1-2% seems absurd. Chris --=20 | Christopher Petrilli | petrilli@gmail.com