From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | Magnus Hagander <magnus(at)hagander(dot)net> |
Cc: | David Barton <dave(at)oneit(dot)com(dot)au>, pgsql-performance(at)postgresql(dot)org |
Subject: | Re: Postgres 9.1.4 - high stats collector IO usage |
Date: | 2012-08-06 14:43:42 |
Message-ID: | CAFj8pRCRPv3i-9WwsSCa=my9M+J5B7K1i1c7TWi0pFLRyjkpWQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
2012/8/6 Magnus Hagander <magnus(at)hagander(dot)net>:
> On Mon, Aug 6, 2012 at 4:16 PM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> wrote:
>> 2012/8/6 Magnus Hagander <magnus(at)hagander(dot)net>:
>>> That's not a good way of doing it, since you loose persistent storage.
>>>
>>> Instead, you should set the stats_temp_dir paramter to a filesystem
>>> somewhere else that is tmpfs. Then PostgreSQL will automatically move
>>> the file to and from the main data directory on startup and shutdown,
>>> so you get both the performance of tmpfs and the persistent
>>> statistics.
>>
>> we had to do it because our read/write of stat file created really
>> high IO - and it was problem on Amazon :( - probably we had not this
>> issue elsewhere
>
> Uh. You realize that if you set stats_temp_dir, it only ever writes to
> the persistent storage once, when you do "pg_ctl stop" (or
> equivalent). Are you saying the shutdown took too long?
>
> I've had to change that param many times on Amazon, but I've never had
> a problem with the shutdown writes. (And I've seen it often enough on
> dedicated hardware as well..)
aha, this is my mistake - we use a stats_temp_directory GUC already -
my advice was use a tmpfs for statfile, but I though realize it via
stats_temp_directory, but I didn't say it.
Regards
Pavel
>
> --
> Magnus Hagander
> Me: http://www.hagander.net/
> Work: http://www.redpill-linpro.com/
From | Date | Subject | |
---|---|---|---|
Next Message | Ioannis Anagnostopoulos | 2012-08-06 15:08:05 | Sequential scan instead of index scan |
Previous Message | Magnus Hagander | 2012-08-06 14:18:49 | Re: Postgres 9.1.4 - high stats collector IO usage |