Re: BUG #12834: Avoiding Disk Control Writes for better Laptop / SSD compatibility. pgstats

Поиск
Список
Период
Сортировка
От Bryce Nesbitt
Тема Re: BUG #12834: Avoiding Disk Control Writes for better Laptop / SSD compatibility. pgstats
Дата
Msg-id CAC9LFPenveGXu7YhOv6L6fmmhN6NFq3L23aQsts+JKLbsaDvkQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #12834: Avoiding Disk Control Writes for better Laptop / SSD compatibility. pgstats  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: BUG #12834: Avoiding Disk Control Writes for better Laptop / SSD compatibility. pgstats  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список pgsql-bugs
On Thu, Mar 5, 2015 at 10:23 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> bryce2@obviously.com writes:
>> Every minute postgresql runs the "stats" process which writes the following
>> files:
>
>> postgres(3814): CW /var/lib/postgresql/9.4/main/pg_stat_tmp/db_0.tmp
>> postgres(3814): CW /var/lib/postgresql/9.4/main/pg_stat_tmp/global.tmp
>> postgres(3814): CW /var/lib/postgresql/9.4/main/pg_stat_tmp/db_12066.tmp
>> postgres(3814): CW /var/lib/postgresql/9.4/main/pg_stat_tmp/global.stat
>> postgres(568): CW /var/lib/postgresql/9.4/main/base/12066/11868
>> unknown(568): CW /var/lib/postgresql/9.4/main/global/12062
>> unknown(568): CW /var/lib/postgresql/9.4/main/base/12066/11828
>> unknown(568): CW /var/lib/postgresql/8.4/main/base/12066/11833
>
> The stats collector only writes something when asked to.  In this
> case what's asking for stats is probably the autovacuum launcher.
> You could dial back the autovacuum naptime if you want fewer
> autovacuum wakeups.

I'm aware that it's possible to configure postgres for fewer wakeups.
This report is more about the default configuration, and about
teaching autovaccum/stats to do nothing if the cluster has been idle.

Given the size of these files, the cumulative impact on a consumer SSD
is pretty high.  Chances are most people will leave naptime at the
default value in small setups.  In big setups this does not matter, as
enterprise disks are set up for this level of wear.

Is autovac writing anything of import during its periodic wakeup on an
idle cluster?

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #12834: Avoiding Disk Control Writes for better Laptop / SSD compatibility. pgstats
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: BUG #12834: Avoiding Disk Control Writes for better Laptop / SSD compatibility. pgstats