PGTune Update: NVMe support, PG18 async I/O, and data-size-aware memory tuning
Hey everyone, I recently put together a major update for the pgtune app to bring its math into the modern PG18. Here is a quick breakdown of what was added: PostgreSQL 18 async I/O: Dynamically scales io_workers (capped at 25% of CPU cores) and routes io_method to io_uring on Linux and worker everywhere else NVMe storage profile: Added a dedicated NVMe storage option, which safely bumps effective_io_concurrency up to 1000 on Linux to exploit deep parallel I/O queues Database size vs. RAM: Added a new input to compare total data size to RAM. If your DB fits entirely in memory, it safely boosts work_mem by 30%. If the DB is massively larger than RAM, it shrinks work_mem by 10% to protect the OS page cache from eviction pressure Modern RAM & Strict OS Guards: Safely raised maintenance_work_mem limits to 8GB for massive servers, but implemented strict OS-level guards to prevent the 2GB integer overflow crash on Windows (for PG 17 and older) Safer Defaults: Implemented a hard 4MB floor on w
Continue reading on Reddit Programming
Opens in a new tab

