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

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

              http://archives.postgresql.org

Reply via email to