Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dAGgH-00010e-3u for pgsql-hackers@arkaria.postgresql.org; Mon, 15 May 2017 14:09:01 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dAGgG-0000ar-1R for pgsql-hackers@arkaria.postgresql.org; Mon, 15 May 2017 14:09:00 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dAGeh-0003U0-UU for pgsql-hackers@postgreSQL.org; Mon, 15 May 2017 14:07:24 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dAGee-0006SV-VM for pgsql-hackers@postgreSQL.org; Mon, 15 May 2017 14:07:22 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id v4FE78r2008900; Mon, 15 May 2017 10:07:08 -0400 From: Tom Lane To: Heikki Linnakangas cc: pgsql-hackers@postgreSQL.org Subject: Re: Receive buffer size for the statistics socket In-reply-to: <0a77466f-408d-ad7e-46c7-2efae718c4d3@iki.fi> References: <22173.1494788088@sss.pgh.pa.us> <0a77466f-408d-ad7e-46c7-2efae718c4d3@iki.fi> Comments: In-reply-to Heikki Linnakangas message dated "Mon, 15 May 2017 12:34:38 +0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <8898.1494857228.1@sss.pgh.pa.us> Date: Mon, 15 May 2017 10:07:08 -0400 Message-ID: <8899.1494857228@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Heikki Linnakangas 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 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers