> For the complete documentation index, see [llms.txt](https://learn.capstorm.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://learn.capstorm.com/best-practices/postgresql-setup.md).

# PostgreSQL Setup

To get the most out of your PostgreSQL database there are a number of tasks you will want to do after you have installed the PostgreSQL Server

## Increase PostgreSQL Memory Allocations

The default maximum memory allocated to a default PostgresQL is minuscule. Yes, this means that a stock PostgreSQL will run on a computer with less capability than a modern cell phone but it also means a lot of unnecessary disk swapping. There are a handful of parameters you will want to bump — all found in postgresql.conf.

The following table lists a few key default PostgreSQL parameters and the parameters used in Capstorm’s labs.

| Parameter              | Default | Capstorm PostgreSQL Servers |
| ---------------------- | ------- | --------------------------- |
| shared\_buffers        | 128MB   | 4GB                         |
| work\_mem              | 4MB     | 1GB                         |
| maintenance\_work\_mem | 64MB    | 1GB                         |
| effective\_cache\_size | 4GB     | 12GB                        |

For additional help see:

* <https://wiki.postgresql.org/wiki/Tuning_Your_PostgreSQL_Server>
