Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XtkUK-0001Hm-B1 for pgsql-bugs@arkaria.postgresql.org; Wed, 26 Nov 2014 21:51:04 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XtkUI-0005Y2-S1 for pgsql-bugs@arkaria.postgresql.org; Wed, 26 Nov 2014 21:51:02 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XtkUI-0005Xw-56 for pgsql-bugs@postgresql.org; Wed, 26 Nov 2014 21:51:02 +0000 Received: from smtp-out1.gransy.com ([77.78.126.51]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XtkUE-0005uh-PC for pgsql-bugs@postgresql.org; Wed, 26 Nov 2014 21:51:00 +0000 Received: from smtp-out.gransy.com (localhost [127.0.0.1]) by smtp-out1.gransy.com (Postfix) with ESMTP id E186A360038 for ; Wed, 26 Nov 2014 22:50:56 +0100 (CET) Received: from smtp.gransy.com (smtp.simplia.cz [77.78.126.20]) by smtp-out1.gransy.com (Postfix) with ESMTP id A08C1360005 for ; Wed, 26 Nov 2014 22:50:56 +0100 (CET) Received: from [192.168.1.163] (ip-78-45-139-138.net.upcbroadband.cz [78.45.139.138]) (Authenticated sender: tv@fuzzy.cz) by smtp.gransy.com (Postfix) with ESMTPSA id D4E5819A03E2 for ; Wed, 26 Nov 2014 22:50:50 +0100 (CET) Message-ID: <54764B3F.5080702@fuzzy.cz> Date: Wed, 26 Nov 2014 22:50:55 +0100 From: Tomas Vondra User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: pgsql-bugs@postgresql.org Subject: Re: BUG #12071: Stat collector went crasy (50MB/s constant writes) References: <20141126130810.15507.39189@wrigleys.postgresql.org> <54763BD8.8020906@fuzzy.cz> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org On 26.11.2014 22:19, Maxim Boguk wrote: > > No active autovacuum processes visible. > Now just interesting calculation: > autovacuum_naptime = 1 second (customized value from production) > active databases - 9... > Suspiciously close to 1/10 second. > Testing: increase autovacuum_naptime to > 10second - two writes per second. > 100second - only two writes every 10 second. > > So yes, pgstat_send_inquiry definitely issued by autovacuum launcher. > Now question why EVERY pgstat_send_inquiry request from autovacuum leads > to the 1-2 full pgstat.stat rewrite on idle server? Well, I think this explains it. The autovacuum starts a worker for a particular database every (naptime/ndatabases), so if you have naptime 1 second and 10 databases, it will start a worker every 100 ms. And that's over the 10ms limit, so every worker will force write of the statfile. And it explains the 50 MB/s writes. Why have you set it to 1 second? The default is 1 minute, which is much saner value. I'm not sure why this was not happening before, though ... Tomas -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs