Re: BUG #12071: Stat collector went crasy (50MB/s constant writes) - Mailing list pgsql-bugs

From Tomas Vondra
Subject Re: BUG #12071: Stat collector went crasy (50MB/s constant writes)
Date
Msg-id 54764B3F.5080702@fuzzy.cz
Whole thread Raw
In response to Re: BUG #12071: Stat collector went crasy (50MB/s constant writes)  (Maxim Boguk <maxim.boguk@gmail.com>)
Responses Re: BUG #12071: Stat collector went crasy (50MB/s constant writes)  (Maxim Boguk <maxim.boguk@gmail.com>)
List pgsql-bugs
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

pgsql-bugs by date:

Previous
From: Maxim Boguk
Date:
Subject: Re: BUG #12071: Stat collector went crasy (50MB/s constant writes)
Next
From: Tomas Vondra
Date:
Subject: Re: BUG #12071: Stat collector went crasy (50MB/s constant writes)