pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
R: Out of memory...
2+ messages / 2 participants
[nested] [flat]

* R: Out of memory...
@ 2012-02-20 16:18  Cassiano, Marco <mcassiano@manord.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Cassiano, Marco @ 2012-02-20 16:18 UTC (permalink / raw)
  To: Kevin Grittner <Kevin.Grittner@wicourts.gov>; pgsql-admin

Thank you Kevin,
 
here is the result of the query :
 
"version";"PostgreSQL 9.1.2 on x86_64-unknown-linux-gnu, compiled by gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-51), 64-bit"
"archive_command";"/usr/local/bin/walscript.sh %p %f"
"archive_mode";"on"
"autovacuum";"on"
"autovacuum_max_workers";"7"
"autovacuum_naptime";"10min"
"autovacuum_vacuum_cost_delay";"20ms"
"autovacuum_vacuum_cost_limit";"200"
"bytea_output";"escape"
"checkpoint_completion_target";"0.8"
"checkpoint_segments";"32"
"checkpoint_timeout";"10min"
"client_encoding";"UNICODE"
"client_min_messages";"warning"
"debug_pretty_print";"off"
"debug_print_parse";"off"
"debug_print_plan";"off"
"debug_print_rewritten";"off"
"default_statistics_target";"200"
"effective_cache_size";"5870MB"
"fsync";"off"
"full_page_writes";"off"
"lc_collate";"en_US.LATIN1"
"lc_ctype";"en_US.LATIN1"
"listen_addresses";"*"
"log_autovacuum_min_duration";"1s"
"log_checkpoints";"on"
"log_connections";"off"
"log_destination";"stderr,syslog"
"log_directory";"/var/logs"
"log_disconnections";"off"
"log_duration";"off"
"log_error_verbosity";"default"
"log_filename";"postgresql-%Y-%m-%d_%H%M%S.log"
"log_line_prefix";"%t %r %u %d %x %c - "
"log_min_duration_statement";"1min"
"log_min_error_statement";"error"
"log_min_messages";"error"
"log_rotation_age";"1d"
"log_rotation_size";"0"
"log_statement";"none"
"log_truncate_on_rotation";"off"
"logging_collector";"on"
"maintenance_work_mem";"300MB"
"max_connections";"250"
"max_stack_depth";"2MB"
"max_wal_senders";"5"
"port";"5432"
"random_page_cost";"2"
"server_encoding";"LATIN1"
"shared_buffers";"1GB"
"silent_mode";"on"
"superuser_reserved_connections";"6"
"synchronous_commit";"off"
"syslog_facility";"local2"
"syslog_ident";"postgres"
"temp_buffers";"8MB"
"TimeZone";"Europe/Rome"
"track_activities";"on"
"track_counts";"on"
"vacuum_cost_delay";"0"
"vacuum_cost_limit";"200"
"wal_buffers";"16MB"
"wal_keep_segments";"10"
"wal_level";"hot_standby"
"work_mem";"12MB

________________________________

Da: Kevin Grittner [mailto:Kevin.Grittner@wicourts.gov]
Inviato: ven 17/02/2012 22.00
A: Cassiano, Marco; pgsql-admin@postgresql.org
Oggetto: Re: [ADMIN] Out of memory...



"Cassiano, Marco" <mcassiano@manord.com> wrote:

> There was an autovaccum running on a big table saying it was "to
> avoid xid wraparound"

> My configuration is :
>
> Postgresql 9.1.2 compiled and running on Redhat 5 64 bit
> DB Size : about 100 GB
>
> RAM 5 GB
> Shared Buffers 1 GB
> temp_buffers = 8MB
> work_mem = 12MB
> maintenance_work_mem = 300MB

Are those the only settings changed from their defaults?  If not, or
you're not sure, please post the output from running the query on
this page:

http://wiki.postgresql.org/wiki/Server_Configuration

-Kevin





^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: R: Out of memory...
@ 2012-02-20 17:09  Kevin Grittner <Kevin.Grittner@wicourts.gov>
  parent: Cassiano, Marco <mcassiano@manord.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Kevin Grittner @ 2012-02-20 17:09 UTC (permalink / raw)
  To: Marco Cassiano <mcassiano@manord.com>; pgsql-admin

"Cassiano, Marco" <mcassiano@manord.com> wrote:
 
> "autovacuum_max_workers";"7"
> "autovacuum_naptime";"10min"
> "autovacuum_vacuum_cost_delay";"20ms"
> "autovacuum_vacuum_cost_limit";"200"
 
You've made autovacuum a little less aggressive for small,
heavily-updated tables with the 10min naptime, even with 7 workers. 
That's some cause for concern, but probably not the immediate
problem.
 
> "fsync";"off"
> "full_page_writes";"off"
 
With those settings, be prepared to go to your last known good
backup if the OS or hardware crashes.
 
> "maintenance_work_mem";"300MB"
 
Each of your seven autovacuum processes can be using that, for 2.1GB
in autovacuum work space.
 
> "max_connections";"250"
> "temp_buffers";"8MB"
> "work_mem";"12MB
 
If you had all connections busy, using temp tables and doing sorts
or hash tables, you could hit 5GB or more in space for that.  On top
of the shared_buffers and maintenance work memory, you could hit 8GB
or more in RAM usage pretty easily.  You might want to consider a
connection pool to allow the 250 client connections to be limited to
a pool of 20 or 30 database connections on the server side.
 
Are you using the INET data type?  There is a bug introduced in
9.1.2 which can leak memory when using that type.  If that's your
problem, you might want to fall back to 9.1.1 and/or install 9.1.3
as soon as it becomes available.
 
-Kevin



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2012-02-20 17:09 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2012-02-20 16:18 R: Out of memory... Cassiano, Marco <mcassiano@manord.com>
2012-02-20 17:09 ` Kevin Grittner <Kevin.Grittner@wicourts.gov>

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