Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## 🚀 Features

- Optimise postgres config
- Cardano's ipc socket file is now stored in a docker volume so when stale can be recreated on all OSes.
- `cardano-cli.sh`, `midnight-node.sh` and `midnight-shell.sh` execute within the running container.
- Switch networks by altering CFG_PRESET only
Expand Down
2 changes: 2 additions & 0 deletions compose-partner-chains.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ services:
- POSTGRES_USER=${POSTGRES_USER}
volumes:
- postgres-data:/var/lib/postgresql/data
- ./postgresql.conf:/etc/postgresql.conf
command: postgres -c config_file=/etc/postgresql.conf -c listen_addresses='*'
ports:
- "${POSTGRES_PORT}:${POSTGRES_PORT}"
healthcheck:
Expand Down
24 changes: 24 additions & 0 deletions postgresql.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Tuned from https://pgtune.leopard.in.ua/?dbVersion=15&osType=linux&dbType=oltp&cpuNum=1&totalMemory=1&totalMemoryUnit=GB&connectionNum=20&hdType=ssd
# (Please regenerate when altering postgres versions.)
#
# DB Version: 15
# OS Type: linux
# DB Type: oltp
# Total Memory (RAM): 3 GB
# CPUs num: 1
# Connections num: 20
# Data Storage: ssd

max_connections = 20
shared_buffers = 768MB
effective_cache_size = 2304MB
maintenance_work_mem = 192MB
checkpoint_completion_target = 0.9
wal_buffers = 16MB
default_statistics_target = 100
random_page_cost = 1.1
effective_io_concurrency = 200
work_mem = 28086kB
huge_pages = off
min_wal_size = 2GB
max_wal_size = 8GB