Skip site navigation (1) Skip section navigation (2)

postgres, freebsd and caching

From: Dror Matalon <dror(at)zapatec(dot)com>
To: SF Postgres <sfpug(at)postgresql(dot)org>
Subject: postgres, freebsd and caching
Date: 2004-02-20 21:07:08
Message-ID: (view raw, whole thread or download thread mbox)
Lists: sfpug
Hi Folks,

Since I know a few people here use freebsd, I thought I'd start here,
rather than the postgres performance list. If you're not running
freebsd, this will probably not interest you.

We have postgres running on freebsd 4.9 with 2 Gigs of memory. As per
repeated advice on the mailing lists we configured effective_cache_size
= 25520 which you get by doing `sysctl -n vfs.hibufspace` / 8192

Which results in using 200Megs for disk caching. If yes, any
suggestions on what would be a good size on a 2 Gig machine? 

Is there a reason not to increase the hibufspace beyond the 200 megs and
provide a bigger cache to postgres? I looked both on the postgres and
freebsd mailing lists and couldn't find a good answer to this.

For good measure, I'm also including the options we've changed in
postgresql.conf just in case there's something else that's obvious that
we've missed.

tcpip_socket = true
max_connections = 100
ssl = false
password_encryption = true
shared_buffers = 8000           # min 16, at least max_connections*2,
8KB each
sort_mem = 8192        # min 64, size in KB
wal_buffers = 64                # min 4, 8KB each
checkpoint_segments = 50 # in logfile segments, min 1, 16MB each
effective_cache_size = 25520    # typically 8KB each
syslog = 2                      # range 0-2; 0=stdout; 1=both; 2=syslog
log_min_duration_statement = 2500 # Log all statements whose
silent_mode = false              # DO NOT USE without Syslog!
log_connections = true
log_pid = true
log_statement = false
log_timestamp = true
stats_start_collector = true
stats_command_string = true
stats_block_level = true
stats_row_level = true
stats_reset_on_server_start = false
lc_messages = 'C'               # locale for system error message
lc_monetary = 'C'               # locale for monetary formatting
lc_numeric = 'C'                # locale for number formatting
lc_time = 'C'                   # locale for time formatting


Dror Matalon
Zapatec Inc 
1700 MLK Way
Berkeley, CA 94709

sfpug by date

Next:From: Craig AddlemanDate: 2004-02-24 00:03:42
Subject: Re: March Meeting?
Previous:From: Josh BerkusDate: 2004-02-19 21:19:04
Subject: Re: March Meeting?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group