Re: 8.3 / 8.2.6 restore comparison - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: 8.3 / 8.2.6 restore comparison
Date
Msg-id 47C0BDA6.2050502@enterprisedb.com
Whole thread Raw
In response to Re: 8.3 / 8.2.6 restore comparison  ("Joshua D. Drake" <jd@commandprompt.com>)
Responses Re: 8.3 / 8.2.6 restore comparison  ("Joshua D. Drake" <jd@commandprompt.com>)
List 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


pgsql-hackers by date:

Previous
From: Mathias Hasselmann
Date:
Subject: Re: [PATCHES] Avahi support for Postgresql
Next
From: "Joshua D. Drake"
Date:
Subject: Re: 8.3 / 8.2.6 restore comparison