Re: Inefficient bytea escaping? - Mailing list pgsql-hackers

From Andreas Pflug
Subject Re: Inefficient bytea escaping?
Date
Msg-id 447747AA.5030509@pse-consulting.de
Whole thread Raw
In response to Re: Inefficient bytea escaping?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:
> Andreas Pflug <pgadmin@pse-consulting.de> writes:
> 
>>Here are the results, with the copy patch:
> 
> 
>>psql \copy 1.4 GB from table, binary:
>>8.0    8.1    8.2dev
>>36s    34s    36s
> 
> 
>>psql \copy 6.6 GB from table, std:
>>8.0    8.1    8.2dev
>>375s    362s    290s (second:283s)
> 
> 
> Hmph.  There's something strange going on on your platform (what is it
> anyway?)

Debian 2.6.26.

>  It's interesting (and surprising) that the runtime is
> actually less for psql \copy than for server COPY.  This is a dual Xeon
> machine, maybe the frontend copy provides more scope to use both CPUs?

The dual CPU explanation sounds reasonable, but I found the same 
tendency on a single 3GHz (HT disabled).
Strange observation using top:
user >90%, sys <10%, idle+wait 0% but only postmaster consumes cpu, 
showing 35%, the rest neglectable.
> 
> It would be interesting to see what's happening on your machine with
> oprofile or equivalent.

I'll investigate further, trying to find the missing CPU.

Regards,
Andreas


pgsql-hackers by date:

Previous
From: Greg Stark
Date:
Subject: Re: Updatable views/with check option parsing
Next
From: Martijn van Oosterhout
Date:
Subject: Re: Creating a case insensitive data type