Created
July 2, 2010 21:29
-
-
Save paul/461927 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
default[:sysctl][:settings]["kernel.shmmax"] = "536870912" # Must be bigger than "shared_buffers" | |
default[:sysctl][:settings]["kernel.shmall"] = "536870912" | |
default[:postgresql][:data_dir] = "/data/postgresql" | |
default[:postgresql][:config_dir] = "/etc/postgresql/8.4/sspg" | |
default[:postgresql][:max_connections] = "100" | |
::Chef::Node.send(:include, Opscode::OpenSSL::Password) | |
default[:postgresql][:ssbe_password] = secure_password | |
# Memory Tuning | |
# See http://wiki.postgresql.org/wiki/Tuning_Your_PostgreSQL_Server for hints | |
# Start at 1/4 system memory | |
default[:postgresql][:shared_buffers] = "256MB" | |
# How much pg should expect to be in fs buffer cache, ~ 1/2 - 3/4 system memory | |
default[:postgresql][:effective_cache_size] = "512MB" | |
# Number of 16MB segments to fill before writing | |
default[:postgresql][:checkpoint_segments] = "16" | |
# Try to time it so that a checkpoint takes this much time before the next one begins | |
default[:postgresql][:checkpoint_completion_target] = "0.9" | |
# Memory that may be use per-connection for sorts | |
default[:postgresql][:work_mem] = "8MB" | |
# Memory available to vaccum | |
default[:postgresql][:maintenance_work_mem] = "64MB" | |
# Make sure you test before changing this from "fsync" or you might lose data | |
default[:postgresql][:wal_sync_method] = "fsync" | |
# How much of the write-ahead log to buffer in memory. 16MB is the max effective, 1MB should be plenty | |
default[:postgresql][:wal_buffers] = "1MB" | |
# Log long-running queries; -1 for off | |
default[:postgresql][:log_min_duration_statement] = "100" | |
default[:postgresql][:ebs][:raid] = false | |
default[:postgresql][:ebs][:raid_volumes] = 0 | |
default[:postgresql][:ebs][:size] = 1 # GB | |
default[:postgresql][:ebs][:device] = "/dev/sdp" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment