From: Natalie Wenz <nataliewenz@ebureau.com>
To: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Cc: bricklen <bricklen@gmail.com>
Cc: Kevin Grittner <kgrittn@ymail.com>
Subject: Re: Dumping a database that is not accepting commands?
Date: Tue, 17 Sep 2013 14:38:33 -0500
Message-ID: <E80F8320-A041-48E5-BD94-5693D75606DB@ebureau.com> (raw)
In-Reply-To: <A8C537BF-969B-41B9-8CFC-652F63E95F57@ebureau.com>
References: <B150080B-9E9A-456F-8B8D-110F07621165@ebureau.com>
<1379421830.30619.YahooMailNeo@web162902.mail.bf1.yahoo.com>
<A8C537BF-969B-41B9-8CFC-652F63E95F57@ebureau.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>
It occurs to me that asking for feedback on the tuning, I am asking about two separate things:
Was there anything in the tuning below that contributed to the database getting into trouble? And is there anything I should change in that tuning to make the single-user vacuum as fast as it can be for optimal recovery time?
> version | PostgreSQL 9.1.9 on x86_64-unknown-freebsd9.1, compiled by gcc (GCC) 4.2.1 20070831 patched [FreeBSD], 64-bit
> autovacuum | on
> autovacuum_analyze_scale_factor | 0.1
> autovacuum_freeze_max_age | 800000000
> autovacuum_max_workers | 3
> autovacuum_vacuum_cost_delay | 0
> autovacuum_vacuum_scale_factor | 0.1
> checkpoint_segments | 128
> effective_cache_size | 12GB
> listen_addresses | *
> log_autovacuum_min_duration | 10s
> log_destination | stderr
> log_filename | logfile-%A.log
> log_line_prefix | %t:%u:%r:[%p]:
> log_rotation_age | 1d
> log_rotation_size | 1GB
> log_truncate_on_rotation | on
> logging_collector | on
> maintenance_work_mem | 10GB
> max_connections | 500
> max_stack_depth | 2MB
> random_page_cost | 1
> seq_page_cost | 1
> shared_buffers | 128MB
> synchronous_commit | off
> temp_buffers | 128MB
> TimeZone | US/Central
> vacuum_cost_limit | 500
> wal_buffers | 32MB
> work_mem | 256MB
>
> This is the tuning of the original database, anything changed from the default settings. The machine it was running on had 48GB of memory. The database was 36TB, with 2 tables taking up the bulk of that (about 14TB each), and about 10 other tables and a few large indexes making up the rest. Our typical usage pattern is mostly inserts, with a some hourly summaries (which take maybe 5 minutes), some daily summaries (which take about 20-40 minutes), and a couple of end of month queries that take several hours. We have the same setup and tuning in production, which is about the same size, with an additional end of month query that runs off one of the 14TB tables, which can take 4-7 days.
>
As far as ideal tuning for the new database, running on 9.3, which will eventually hold all the data from the sad, recovering original database with the usage patterns described below, how is this for a starting point? I tried to follow the basic guidelines in the High Performance book, but sometimes I feel like I'm largely guessing.
name | current_setting
---------------------------------+---------------------------------------------------------------------------------------------------------------
version | PostgreSQL 9.3.0 on x86_64-unknown-freebsd9.1, compiled by gcc (GCC) 4.2.1 20070831 patched [FreeBSD], 64-bit
autovacuum | on
autovacuum_analyze_scale_factor | 0.1
autovacuum_freeze_max_age | 800000000
autovacuum_max_workers | 3
autovacuum_vacuum_cost_delay | 0
autovacuum_vacuum_scale_factor | 0.1
checkpoint_segments | 128
effective_cache_size | 12GB
lc_collate | C
lc_ctype | C
listen_addresses | *
log_autovacuum_min_duration | 1min
log_destination | stderr
log_filename | logfile-%A.log
log_line_prefix | %t:%u:%r:[%p]:
log_min_duration_statement | 1min
log_rotation_age | 1d
log_rotation_size | 1GB
log_truncate_on_rotation | on
logging_collector | on
maintenance_work_mem | 4GB
max_connections | 500
max_stack_depth | 2MB
random_page_cost | 1
seq_page_cost | 1
shared_buffers | 12GB
synchronous_commit | off
temp_buffers | 128MB
TimeZone | US/Central
vacuum_cost_limit | 500
wal_buffers | 16MB
work_mem | 256MB
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-admin@postgresql.org
Cc: nataliewenz@ebureau.com, bricklen@gmail.com, kgrittn@ymail.com
Subject: Re: Dumping a database that is not accepting commands?
In-Reply-To: <E80F8320-A041-48E5-BD94-5693D75606DB@ebureau.com>
References: <B150080B-9E9A-456F-8B8D-110F07621165@ebureau.com> <1379421830.30619.YahooMailNeo@web162902.mail.bf1.yahoo.com> <A8C537BF-969B-41B9-8CFC-652F63E95F57@ebureau.com> <E80F8320-A041-48E5-BD94-5693D75606DB@ebureau.com>
* 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