From: Tomas Vondra <tv@fuzzy.cz>
To: pgsql-bugs@postgresql.org
Subject: Re: BUG #12071: Stat collector went crasy (50MB/s constant writes)
Date: Wed, 26 Nov 2014 22:50:55 +0100
Message-ID: <54764B3F.5080702@fuzzy.cz> (raw)
In-Reply-To: <CAK-MWwTFTRVuBjLz_rJVNEompGj2btot88G5uwXW+d2DierSNQ@mail.gmail.com>
References: <20141126130810.15507.39189@wrigleys.postgresql.org>
<CAK-MWwSDmXTWCc3F2Wj3Zw6WZ_3JSKHaXFqZ2TDuq1jfKZOu=A@mail.gmail.com>
<CAK-MWwQJF+EM5f_47r5wLpr6_2FBYNFeKKAD-DPP3JtzuAM15Q@mail.gmail.com>
<CAK-MWwTmJV4VprhAfCyTKRLndYbwbToF-Z0JYv6_o=qq3VYxyQ@mail.gmail.com>
<54763BD8.8020906@fuzzy.cz>
<CAK-MWwTFTRVuBjLz_rJVNEompGj2btot88G5uwXW+d2DierSNQ@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tv@fuzzy.cz
Subject: Re: BUG #12071: Stat collector went crasy (50MB/s constant writes)
In-Reply-To: <54764B3F.5080702@fuzzy.cz>
References: <20141126130810.15507.39189@wrigleys.postgresql.org> <CAK-MWwSDmXTWCc3F2Wj3Zw6WZ_3JSKHaXFqZ2TDuq1jfKZOu=A@mail.gmail.com> <CAK-MWwQJF+EM5f_47r5wLpr6_2FBYNFeKKAD-DPP3JtzuAM15Q@mail.gmail.com> <CAK-MWwTmJV4VprhAfCyTKRLndYbwbToF-Z0JYv6_o=qq3VYxyQ@mail.gmail.com> <54763BD8.8020906@fuzzy.cz> <CAK-MWwTFTRVuBjLz_rJVNEompGj2btot88G5uwXW+d2DierSNQ@mail.gmail.com> <54764B3F.5080702@fuzzy.cz>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox