Re: limiting query time and/or RAM

From: Alan McKay <alan(dot)mckay(at)gmail(dot)com>
To: Postgres General Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: limiting query time and/or RAM
Date: 2009-09-17 20:20:15
Message-ID: 844129e80909171320p5a288e6r6647ba043d673f70@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> I'm gonna make a SWAG that you've got 4 to 4.5G shared buffers, and if
> you subract that from DRS you'll find it's using a few hundred to
> several hundred megs.  still a lot, but not in the 4G range you're
> expecting.  What does top say about this?

I've just add this in my cronjob with "top -b -n 1 -u postgres".
Hopefully I won't let you know tomorrow :-)

listen_addresses = '*' # what IP address(es) to listen on;
port = 5432 # (change requires restart)
max_connections = 350 # (change requires restart)
shared_buffers = 500MB # min 128kB or max_connections*16kB
work_mem = 2MB # min 64kB
maintenance_work_mem = 128MB # min 1MB
max_fsm_pages = 153600 # min max_fsm_relations*16, 6 bytes each
fsync = on # turns forced synchronization on or off
wal_sync_method = fsync # the default is the first option
full_page_writes = on # recover from partial page writes
wal_buffers = 1MB # min 32kB
commit_delay = 0 # range 0-100000, in microseconds
checkpoint_segments = 16 # in logfile segments, min 1, 16MB each
archive_mode = on # allows archiving to be done
archive_command = 'test ! -f /data/pgsql/backups/wal_arch/%f.gz && cp
%p /var/lib/pgsql/backups/wal_arch/%f' # command to use to archive a
logfile segment
archive_timeout = 0 # force a logfile segment switch after this
effective_cache_size = 10GB
default_statistics_target = 100 # range 1-1000
logging_collector = on # Enable capturing of stderr and csvlog
log_directory = 'pg_log' # directory where log files are written,
log_connections = off
log_disconnections = off
log_hostname = off
log_line_prefix = '%t:%u(at)%r:%p' # special values:
autovacuum = off # Enable autovacuum subprocess? 'on'
search_path = '"$user",public,quant001,dbprc001,price001,instrument001,client001'
# schema names
vacuum_freeze_min_age = 1000000000
datestyle = 'iso, mdy'
lc_messages = 'en_US.utf8' # locale for system error message
lc_monetary = 'en_US.utf8' # locale for monetary formatting
lc_numeric = 'en_US.utf8' # locale for number formatting
lc_time = 'en_US.utf8' # locale for time formatting
default_text_search_config = 'pg_catalog.english'
custom_variable_classes = 'olap'
olap.rownum_name = 'default'

--
“Don't eat anything you've ever seen advertised on TV”
- Michael Pollan, author of "In Defense of Food"

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2009-09-17 20:22:17 Re: NAS
Previous Message Arnold, Sandra 2009-09-17 20:12:24 Re: Substitutes for some Oracle packages