Charmed PostgreSQL VM
- Canonical
- Databases
Channel | Revision | Published | Runs on |
---|---|---|---|
latest/stable | 345 | 09 Nov 2023 | |
latest/stable | 239 | 09 Feb 2022 | |
latest/stable | 226 | 01 Apr 2021 | |
14/stable | 468 | 11 Sep 2024 | |
14/stable | 467 | 11 Sep 2024 | |
14/candidate | 468 | 02 Sep 2024 | |
14/candidate | 467 | 02 Sep 2024 | |
14/beta | 516 | 19 Nov 2024 | |
14/beta | 515 | 19 Nov 2024 | |
14/edge | 518 | 19 Nov 2024 | |
14/edge | 517 | 19 Nov 2024 |
juju deploy postgresql --channel 14/beta
Deploy universal operators easily with Juju, the Universal Operator Lifecycle Manager.
Platform:
22.04
20.04
18.04
16.04
14.04
Performance and resource allocation
This page covers topics related to measuring and configuring the performance of PostgreSQL
Performance testing
For performance testing and benchmarking charms, we recommend using the Charmed Sysbench operator. This is a tool for benchmarking database applications that includes monitoring and CPU/RAM/IO performance measurement.Resource allocation
Charmed PostgreSQL resource allocation can be controlled via the charm’sprofile
config option. There are two profiles: production
and testing
.
Value | Description | Details |
---|---|---|
production (default) |
Maximum performance | 25% of the available memory for shared_buffers and the remain as cache memory (defaults mimic legacy charm behaviour).The max_connections =max(4 * os.cpu_count(), 100).Use pgbouncer if max_connections are not enough (reasoning). |
testing |
Minimal resource usage | PostgreSQL 14 defaults. |
Note: Pre-deployed application profile change is planned but currently is NOT supported.
You can set the profile during deployment using the --config
flag. For example:
juju deploy postgresql --config profile=testing
You can change the profile using the juju config
action. For example:
juju config postgresql profile=production
For a list of all of this charm’s config options, see the Configuration tab.
Juju constraints
The Juju --constraints
flag sets RAM and CPU limits for Juju units:
juju deploy postgresql --constraints cores=8 mem=16G
Juju constraints can be set together with the charm’s profile:
juju deploy postgresql --constraints cores=8 mem=16G --config profile=testing