From: bryce2@obviously.com
To: pgsql-bugs@postgresql.org
Subject: BUG #12834: Avoiding Disk Control Writes for better Laptop / SSD compatibility. pgstats
Date: Thu, 05 Mar 2015 18:14:32 +0000
Message-ID: <20150305181432.2529.76377@wrigleys.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
The following bug has been logged on the website:
Bug reference: 12834
Logged by: Bryce Nesbitt
Email address: bryce2@obviously.com
PostgreSQL version: 9.4.1
Operating system: Linux
Description:
This is an issue primarily for home computers and laptops which run
postgres, but not under heavy load.
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
This data was collected with "fatrace". There's one set of writes per
installed version of postgres on the test system (8.1,9.1,9.3,9.4).
----
Would it be possible to have the stats process take no action and make no
writes to the disk, if there has been no database activity in the interval?
---
For laptops disk writes wake up the machine and/or harddrive. For SSD's
it's a wear leveling issue. With this write happening 24/7 on millions of
computers this is also an energy use optimization potential (reduce
electricity use from your keyboard!)
--
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: bryce2@obviously.com
Subject: Re: BUG #12834: Avoiding Disk Control Writes for better Laptop / SSD compatibility. pgstats
In-Reply-To: <20150305181432.2529.76377@wrigleys.postgresql.org>
References: <20150305181432.2529.76377@wrigleys.postgresql.org>
* 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