pgconfigurator
pgconfigurator

bgwriter_lru_maxpages

No restart — takes effect on reloadtuned by pgconfiguratorcount (pages per round)

How many dirty pages the background writer may flush per round.

What pgconfigurator would set
32 GB · 8 vCPU · NVMe · OLTP
Computing…
Tune for your exact server → /tunecomputed in your browser · nothing uploaded

What it does

The background writer trickles dirty pages out to disk ahead of checkpoints so that backends rarely have to write a page themselves before reusing a buffer. This caps how many pages it writes each round.

How to tune it

The default (100) is modest. On write-heavy systems, raising it lets the background writer do more of the flushing work, smoothing I/O and reducing backend-initiated writes. Pair with bgwriter_delay (how often rounds happen).

Related parameters