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 9E9DD52A2D for ; Tue, 19 Jul 2005 14:05:32 -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 91881-05 for ; Tue, 19 Jul 2005 17:05:31 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 289BA52863 for ; Tue, 19 Jul 2005 14:05:29 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j6JH5PS6007437; Tue, 19 Jul 2005 13:05:25 -0400 (EDT) To: Christopher Petrilli Cc: PFC , Vivek Khera , pgsql-performance@postgresql.org Subject: Re: Impact of checkpoint_segments under continual load conditions In-reply-to: <59d991c4050719095440cd3de5@mail.gmail.com> References: <59d991c4050717100874c08a86@mail.gmail.com> <16394.1121715156@sss.pgh.pa.us> <59d991c405071812342e290f57@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> Comments: In-reply-to Christopher Petrilli message dated "Tue, 19 Jul 2005 12:54:35 -0400" Date: Tue, 19 Jul 2005 13:05:25 -0400 Message-ID: <7436.1121792725@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200507/293 X-Sequence-Number: 13534 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 > 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? Are you sure the backend is reading directly from the file, and not through psql? (\copy, or COPY FROM STDIN, would go through psql.) 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 ... regards, tom lane