Skip to content

Deployment performance notes

perrygeo edited this page Aug 7, 2012 · 5 revisions

DB tuning

Per http://www.westnet.com/~gsmith/content/postgresql/pg-5minute.htm

  • in /etc/postgresql/8.4/main/postgresql.conf set shared_buffers = 1024MB or 1/4 system resources
  • allow kernel to allocate the memory sudo sysctl -w kernel.shmmax=1195352320. Notes this should be a few MB more than the shared_buffers to provide some wiggle room.
  • in /etc/sysctl.conf (or the appropriate /etc/sysctl.d/*.conf depending on your system), set the kernel memory so it gets recognized at next reboot: kernel.shmmax=1195352320
  • restart postgres

mod_wsgi

Optimal threads/processes for wsgi daemon?

Dont't use processes=1 for WSGIDaemonProcess (if you want a single process, leave it off entirely)