# Silo PostgreSQL Performance Configuration # Tuned for: modern multi-core CPU, NVMe/Optane storage, ~8GB max RAM usage # DB Type: Web application (read-heavy, DB fits in RAM) # # Adjust values for your hardware, or use https://pgtune.leopard.in.ua/ # with DB Type "Web application" to generate settings. # Connections listen_addresses = '*' max_connections = 100 # Memory (tuned to keep PG under ~8GB total) shared_buffers = 4GB # holds the entire DB in cache (typical DB is 1-4GB) effective_cache_size = 6GB # planner hint only, not an allocation work_mem = 32MB # per-operation sort/hash memory maintenance_work_mem = 512MB # VACUUM, CREATE INDEX, catalog imports # WAL / Write Performance wal_buffers = 64MB min_wal_size = 512MB max_wal_size = 2GB checkpoint_completion_target = 0.9 # Storage (NVMe/Optane) random_page_cost = 1.1 # default 4.0; NVMe random ≈ sequential effective_io_concurrency = 200 # NVMe handles many concurrent requests # Parallelism max_worker_processes = 8 max_parallel_workers_per_gather = 4 max_parallel_workers = 8 max_parallel_maintenance_workers = 4 # Huge Pages (Linux only, no effect on macOS) huge_pages = try # Logging (uncomment to log slow queries) # log_min_duration_statement = 250