From: | Maxim Boguk <maxim(dot)boguk(at)gmail(dot)com> |
---|---|
To: | Tomas Vondra <tv(at)fuzzy(dot)cz> |
Cc: | pgsql-bugs <pgsql-bugs(at)postgresql(dot)org> |
Subject: | Re: BUG #12071: Stat collector went crasy (50MB/s constant writes) |
Date: | 2014-11-26 23:01:32 |
Message-ID: | CAK-MWwQQedwJVk2LJ0g7LXJAr82NSSvOSv6BBAdSGFB8cLkObg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs pgsql-hackers |
On Thu, Nov 27, 2014 at 1:26 AM, Tomas Vondra <tv(at)fuzzy(dot)cz> wrote:
> On 26.11.2014 23:06, Maxim Boguk wrote:
> >
> >
> > I'm not sure I understand what you mean.
> >
> > The timestamp *IS* updated on every write - see this:
> >
> >
> https://github.com/postgres/postgres/blob/REL9_2_STABLE/src/backend/postmaster/pgstat.c#L3469
> >
> >
> > I mean that usually 99.9% writes goes through mmap, which update the
> > pgstat.tmp file timestamp (but not update last_statwrite value).
>
> I don't follow. Can you explain what you mean by the mmap? I don't see
> any mmap stuff in pgstat.c, nor I remember dealing with mmap in my
> patches in this area ...
>
Hm I had been wrong. I seen mmap call on strace after every statistic
collector file rewrite and I thought that all writes to that file goes
through memory mapped structure instead of full file writes every time when
someone need fresh data.
However, point still open - there are no reason to write a new file from
scratch if no activity had been received from stat socket since the last
write (the same point valid for per-database stat files in 9.3+).
And check
https://github.com/postgres/postgres/blob/REL9_2_STABLE/src/backend/postmaster/pgstat.c#L3972
looks like redundant in that case?
Kind Regards,
Maksym
From | Date | Subject | |
---|---|---|---|
Next Message | Maxim Boguk | 2014-11-26 23:13:52 | Re: BUG #12071: Stat collector went crasy (50MB/s constant writes) |
Previous Message | Tomas Vondra | 2014-11-26 22:26:34 | Re: BUG #12071: Stat collector went crasy (50MB/s constant writes) |
From | Date | Subject | |
---|---|---|---|
Next Message | Maxim Boguk | 2014-11-26 23:13:52 | Re: BUG #12071: Stat collector went crasy (50MB/s constant writes) |
Previous Message | Bruce Momjian | 2014-11-26 23:00:50 | Re: Maximum number of WAL files in the pg_xlog directory |