This is an old revision of the document!


The values and suggestions expressed here are just that, it's basic rules that Edoceo uses, YMMV. As always one should experiment with what values work best for your environment.

  • max_connections = N Set this to 140% of the average number of expected connections. 100 clients average means 140 max connections.
  • shared_buffers = N Set anywhere from 1/4 to 1/2 physical memory, must set kernel shared memory max first. Will see noticeable difference. These are calculated as 8K blocks so 256M would be 32768 = 1024*1024*256/8192.
  • fsync = true|false Setting this to false will speed up the file system but crashes or unexpeced stop will require a restore from backup, keep as fsync=true
  • work_mem = N Default is 1M but 2M doesn't hurt, this can also be set per connection via SET command which is reccomended.
  • effective_cache_size = N The assumption about cached files by the operating system, look in /proc/sys/fs/file-nr and file-max for clues.
  • log_statement = 'none'

On production system, where it can be avoided, turn off statement logging and minimize the other logging parameters.

   syslog_facility = 'LOCAL2'
   syslog_ident = 'postgres'
   log_connections = false
   log_disconnections = false
   log_duration = false
   log_statement = 'none' 
postgresql/tuning.1216046278.txt.gz · Last modified: 2009/05/25 00:34 (external edit)
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0 ipv6 ready