[pgpool-general: 9229] Re: PGPOOL load

Ilko Krastev ilko.krastev at gmail.com
Mon Oct 21 19:24:06 JST 2024


Hi

The copy is run from program

COPY FROM: program-> copy->pool->postgres

"Yes, they are slow because it needs to fly all the data over
network."
The problem is that the pgpool make very high load 30-50% for the time when is executed and when there is many requests it even crash.
I dont have a problem with slow execution.


On 21.10.24 13:00, Tatsuo Ishii wrote:

>>> I have problem with my pgpool it make very big load when run COPY FROM
>>> or COPY TO command to import or export file.
>>>
>>> Can you suggest solution.
>> You mean COPY FROM PROGRAM or STDIN, or COPY TO PROGRAM or STDOUT are
>> slow? Yes, they are slow because it needs to fly all the data over
>> network. For example:
>>
>> copy pgbench_accounts to program 'cat > /tmp/copy.out';
>> will transfer data like this.
>> PostgreSQL -> pgpool -> cat -> /tmp/copy.out
>>
>> On my laptop, the command above took 73.859 ms.
>> test=# copy pgbench_accounts to program 'cat > /tmp/copy.out';
>> COPY 100000
>> Time: 73.859 ms
> Sorry, the example was not appropreate since the cat command is
> executed on the same server as PostgreSQL backend, and the data does
> not fly through pgpool. More appropreate example is using COPY TO STDOUT.
>
> t-ishii$ time psql -p 11000 test -c "copy pgbench_accounts to stdout" > /tmp/copy.out
>
> real	0m0.073s
> user	0m0.000s
> sys	0m0.031s
>
> This took 73 ms and slow.
>
>> On the other hand copying to directly local file runs much faster.
>>
>> test=# copy pgbench_accounts to '/tmp/copy.out';
>> COPY 100000
>> Time: 49.378 ms
>>
>> So my advice is, do followings:
>>
>> COPY table TO 'file';
>> or COPY table FROM 'file';
>>
>> Best reagards,
>> --
>> Tatsuo Ishii
>> SRA OSS K.K.
>> English: http://www.sraoss.co.jp/index_en/
>> Japanese:http://www.sraoss.co.jp
>> _______________________________________________
>> pgpool-general mailing list
>> pgpool-general at pgpool.net
>> http://www.pgpool.net/mailman/listinfo/pgpool-general


More information about the pgpool-general mailing list