Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 034929FB8D0 for ; Wed, 23 May 2007 11:13:59 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 55840-04 for ; Wed, 23 May 2007 11:13:49 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.169]) by postgresql.org (Postfix) with ESMTP id EAAC89FB895 for ; Wed, 23 May 2007 11:13:53 -0300 (ADT) Received: by ug-out-1314.google.com with SMTP id o4so68044uge for ; Wed, 23 May 2007 07:13:51 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=YayunbdQnuZJexanEPn3sZoW3o2Di7zjgBKDpVv/oCd0IT+tf62qVoMASvDSxcESMEhTZqFaypnAZ1koowedduK7l5ouPXE48UrqMNqDSd5LDNctyr9+lpwSYa8BQgsXgUyTls2KysBEUJHrGQ9cxZAnvmRhAFgTXtdGBZCx5es= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=o2yICYpcd4eLkD2SiwNfjdoLE836gRWZL7qjcJ3bGpZqG0cTxvty5i6B1/gVdv6+KIcywzC4b4i155G3tPb0ICPwuAUOZiVFkARM05r6ztUIl4t198m7lKBhdTvBpl4WOzfXgzJVonvtPVARBLrve4De0kWBx4yJA9ekKIv9wQA= Received: by 10.78.120.6 with SMTP id s6mr111661huc.1179929631103; Wed, 23 May 2007 07:13:51 -0700 (PDT) Received: by 10.78.201.16 with HTTP; Wed, 23 May 2007 07:13:51 -0700 (PDT) Message-ID: <1d219a6f0705230713k83eff27y3a9db9ade4839ee0@mail.gmail.com> Date: Wed, 23 May 2007 10:13:51 -0400 From: "Chris Hoover" To: "Alvaro Herrera" Subject: Re: What happens on a commit? Cc: "pgsql-admin@postgresql.org" In-Reply-To: <20070522193010.GH11032@alvh.no-ip.org> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_86634_21846656.1179929631075" References: <1d219a6f0705221025i1c1d036eq4769b133cac7499@mail.gmail.com> <1d219a6f0705221110v6718eaa1w67e17ac0c940772a@mail.gmail.com> <20070522193010.GH11032@alvh.no-ip.org> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200705/247 X-Sequence-Number: 25567 ------=_Part_86634_21846656.1179929631075 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Ok, we are looking more into this. In the mean time, can someone please explain to me (or point me to the correct documentation) what happens in PostgreSQL when a commit is issued. What exactly does the database do? Thanks, Chris On 5/22/07, Alvaro Herrera wrote: > > Chris Hoover escribi=F3: > > I found an e-mail showing how to strace and here is what I have > found. Does > > it help/mean anything to those who can decode this? > > > > We are installing PostgreSQL from the official rpms. > > > > Chris > > > > time strace -c -p 2690 > > Process 2690 attached - interrupt to quit > > Process 2690 detached > > % time seconds usecs/call calls errors syscall > > ------ ----------- ----------- --------- --------- ---------------- > > 42.80 13.003288 251 51790 recv > > 17.47 5.306686 30 175916 send > > This means that 60% of the time spent by system calls is due to network > operations. But they account to 18.3 seconds, whereas this > > > real 27m21.090s > > user 0m5.379s > > sys 0m23.073s > > says that the total time spent is 27:21. So you have to explain the > remaining 27:03 which are elsewhere. > > -- > Alvaro Herrera > http://www.CommandPrompt.com/ > The PostgreSQL Company - Command Prompt, Inc. > ------=_Part_86634_21846656.1179929631075 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Ok, we are looking more into this.  In the mean time, can someone plea= se explain to me (or point me to the correct documentation) what happens in= PostgreSQL when a commit is issued.  What exactly does the database d= o?

Thanks,

Chris

On 5/22/07, Alvaro Herrera <alvherre@commandprompt.com> wrote: Chris Hoover escribi=F3:
> I found an e-mail showing how to strace an= d here is what I have found.  Does
> it help/mean anything = to those who can decode this?
>
> We are installing PostgreSQL = from the official rpms.
>
> Chris
>
> time strace -c -p 2690
> Proce= ss 2690 attached - interrupt to quit
> Process 2690 detached
> = % time     seconds  usecs/call  &nb= sp;  calls    errors syscall
> ------ ------= ----- ----------- --------- --------- ----------------
> 42.80   13.003288      &nb= sp;  251     51790     &n= bsp;     recv
> 17.47    5.30= 6686          30 &nb= sp;  175916         =   send

This means that 60% of the time spent by system calls is= due to network
operations.  But they account to=20 18.3 seconds, whereas this

> real    27m21.09= 0s
> user    0m5.379s
> sys  &nbs= p;  0m23.073s

says that the total time spent is 27:21. &nb= sp;So you have to explain the
remaining 27:03 which are elsewhere.

--
Alvaro Herrera        = ;            &n= bsp;           http://www.CommandPrompt.com/
T= he PostgreSQL Company - Command Prompt, Inc.

------=_Part_86634_21846656.1179929631075--