Re: 8.3 / 8.2.6 restore comparison

From: "Heikki Linnakangas" <heikki(at)enterprisedb(dot)com>
To: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
Cc: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Stefan Kaltenbrunner" <stefan(at)kaltenbrunner(dot)cc>, "Luke Lonergan" <llonergan(at)greenplum(dot)com>, "Greg Smith" <gsmith(at)gregsmith(dot)com>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: 8.3 / 8.2.6 restore comparison
Date: 2008-02-24 00:43:18
Message-ID: 47C0BDA6.2050502@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Joshua D. Drake wrote:
> Joshua D. Drake wrote:
>
>>> OK, so it is CPU-bound after all. Do you have oprofile or anything
>>> equivalent?
>>
>> I am at your disposal. If you need oprofile tell me the command and I
>> will get you the output.
>
> (thanks to stefan for helping me get this output)
>
> opreport -l /usr/bin/postgres
> CPU: AMD64 processors, speed 2411.14 MHz (estimated)
> Counted CPU_CLK_UNHALTED events (Cycles outside of halt state) with a
> unit mask of 0x00 (No unit mask) count 100000
> samples % symbol name
> 47654 15.5165 DoCopy
> 36231 11.7971 CopyReadLine
> 25046 8.1551 heap_formtuple
> 24137 7.8592 XLogInsert
> 13829 4.5028 InputFunctionCall
> 9618 3.1317 ParseDateTime
> 9521 3.1001 DecodeDateTime
>>>> 9446 3.0757 pg_next_dst_boundary

This function should've become faster with the tzcode update last week,
though since it's only taking 3% of the time in your case, you won't notice.

This profile looks very similar to what I've seen in my tests. DoCopy
tends to be at the top. Digging deeper into that, I believe that much of
the time attributed to DoCopy is actually spent in
CopyReadAttributesText, but since it's inlined oprofile can't show it
separately.

Incidentally, I've been working on a patch to speed up CopyReadLine. I
was going to run some more tests first, but since we're talking about
it, I guess I should just post the patch. I'll post to pgsql-patches
shortly.

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2008-02-24 01:29:47 CopyReadLineText optimization
Previous Message Mathias Hasselmann 2008-02-23 21:19:17 Re: Avahi support for Postgresql