Re: [HACKERS] Receive buffer size for the statistics socket - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] Receive buffer size for the statistics socket
Date
Msg-id 8899.1494857228@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] Receive buffer size for the statistics socket  (Heikki Linnakangas <hlinnaka@iki.fi>)
List pgsql-hackers
Heikki Linnakangas <hlinnaka@iki.fi> writes:
> On 05/14/2017 09:54 PM, Tom Lane wrote:
>> A further idea is that maybe backends should be tweaked to avoid
>> blasting large amounts of data at the stats collector in one go.
>> That would require more thought to design, though.

> The data is already sent in small < 1 kB messages, I don't see what more 
> we can do in the sender side to avoid overwhelming the receiver. Except 
> reduce the amount of data sent overall. But that only goes so far, we 
> cannot eliminate the problem altogether, unless we also lose some detail.

I was wondering about some sort of rate-throttling on the messages.
For instance, stop after sending X kilobytes, leaving remaining counts
to be sent at the next opportunity.  (Although it's not clear if you'd
ever catch up :-(.)  Or just a short sleep after every X kilobytes, to
make it more probable that the stats collector gets to run and collect
the data.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Haribabu Kommi
Date:
Subject: [HACKERS] Increasing parallel workers at runtime
Next
From: Dilip Kumar
Date:
Subject: Re: [HACKERS] Increasing parallel workers at runtime