Re: PG_DUMP very slow because of STDOUT ??

Поиск
Список
Период
Сортировка
От Andras Fabian
Тема Re: PG_DUMP very slow because of STDOUT ??
Дата
Msg-id B1A1AD14D5F9D647BD2A00988C53B8220ACA3208@atradaex03.nbg.atrada.net
обсуждение исходный текст
Ответ на Re: PG_DUMP very slow because of STDOUT ??  (Craig Ringer <craig@postnewspapers.com.au>)
Ответы Re: PG_DUMP very slow because of STDOUT ??  (Craig Ringer <craig@postnewspapers.com.au>)
Список pgsql-general
Wait, now, here I see some correlation! Yes, it seems to be the memory! When I start my COPY-to-STDOUT experiment I had
some2000 MByte free (well ,the server has 24 GByte ... maybe other PostgreSQL processes used up the rest). Then, I
couldmonitor via "ll -h" how the file nicely growed (obviously no congestion), and in parallel see, how "free -m" the
"free"memory went down. Then, it reached a level below 192 MByte, and congestion began. Now it is going back and forth
around118-122-130 ... Obviously the STDOUT thing went out of some memory resources. 
Now I "only" who and why is running out, and how I can prevent that. Could there be some extremely big STDOUT buffering
inplay ???? 

I will need to do some more investigation. And thanks for your very good pointers which help me to narrow the focus
down!

Andras Fabian

-----Ursprüngliche Nachricht-----
Von: Craig Ringer [mailto:craig@postnewspapers.com.au]
Gesendet: Dienstag, 13. Juli 2010 12:17
An: Andras Fabian
Cc: pgsql-general@postgresql.org
Betreff: Re: AW: AW: [GENERAL] PG_DUMP very slow because of STDOUT ??

On 13/07/10 17:18, Andras Fabian wrote:

> But still no definitive clue about the reasons. What is also quite interesting is, that when I start my
COPY-to-STDOUTexperiment, it is running quite fast in the beginning. Sometimes up to 400 Mbytes, sometimes up to 1.4
GBytes(I didn't find a real reason which I could be correlated to this) ... and then, suddenly it begins to stall. From
thereon, it only advances slowly with all the congestion_wait going on ... Hmm, maybe it has really something to do
withthe state of the memory ... (this would go well with the fact, that a freshly rebooted server is not having the
problemin the beginning). 

Is there any chance something is buffering the output of the COPY ... TO
STDOUT? Whether it's a pipe/socket buffer that grows to a certain limit,
then begins to be limited by the ability of the receiver to empty it, or
whether it's the receiver buffering the whole COPY in memory before
writing it out, I don't know.

Do you see anything growing in memory use on the system while the COPY
is in progress? Any of the memory use stats in "free -m" changing"?

--
Craig Ringer

В списке pgsql-general по дате отправления:

Предыдущее
От: Andras Fabian
Дата:
Сообщение: Re: PG_DUMP very slow because of STDOUT ??
Следующее
От: Craig Ringer
Дата:
Сообщение: Re: PG_DUMP very slow because of STDOUT ??