Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

Postgres Tuning For Developers: Difference between revisions

From MoodleDocs
(Created page with "These are instructions for tuning a default Postgres 9.1.7 install on Ubuntu (12.04) with 16GB of RAM. These instructions are intended for development machines only - not produc...")
 
No edit summary
Line 34: Line 34:


Reboot!
Reboot!
[[Category:Developer tools]]

Revision as of 02:22, 7 February 2013

These are instructions for tuning a default Postgres 9.1.7 install on Ubuntu (12.04) with 16GB of RAM.

These instructions are intended for development machines only - not production environments.

These are based on recommendations from here: http://wiki.postgresql.org/wiki/Tuning_Your_PostgreSQL_Server

First - results:

Before changes - unit tests on master took ~ 09:00

After changes - unit tests on master took 05:48

Changes

Change Setting in File: /etc/postgresql/9.1/main/postgresql.conf

shared_buffers = 512MB # Recommended 1/4 of RAM - I'm leaving this lower on a dev machine (still up from 24MB)

effective_cache_size = 8GB # Recommended 1/2 of RAM
checkpoint_segments = 20 # Recommended minimum
checkpoint_completion_target = 0.9 # Up from 0.5
work_mem = 20MB # Used for in memory sorts
synchronous_commit = off # Fine only for dev machines

Append File: /etc/sysctl.conf


# Postgres tuning
kernel.shmmax=1073741824

Reboot!