pgtune icon indicating copy to clipboard operation
pgtune copied to clipboard

`io_workers` configuration?

Open JanecekPetr opened this issue 2 months ago • 1 comments

Portgres 18 came with a io_method config which defaults to worker.
If the worker option is selected, then the io_workers config becomes relevant, and it defaults to 3. There's a blog by a postgres dev saying

Based on the discussion in this blog post, my tuning advice is to:

  • Keep the io_method = worker default, unless you can demonstrate the io_uring actually works better for your workload. Use sync only if you need a behavior as close to Postgres 17 as possible (even if it means being slower in some cases).
  • Increase io_workers to a value considering the total number of cores. Something like 25% cores seems reasonable, possibly even 100% in extreme cases.

Does pgtune want to include an io_workers recommendation based on the number of available CPUs?

JanecekPetr avatar Oct 17 '25 08:10 JanecekPetr

Thanks for information.

Increase io_workers to a value considering the total number of cores. Something like 25% cores seems reasonable, possibly even 100% in extreme cases.

This is good question - what should propose pgtune. Maybe 50% of cpu, but I need someone to make testing and check safe and best value on provided hardware

le0pard avatar Oct 17 '25 09:10 le0pard