惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

The Hacker News
The Hacker News
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
雷峰网
雷峰网
人人都是产品经理
人人都是产品经理
Recent Announcements
Recent Announcements
D
DataBreaches.Net
P
Proofpoint News Feed
V
Visual Studio Blog
J
Java Code Geeks
Recorded Future
Recorded Future
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
F
Full Disclosure
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
The GitHub Blog
The GitHub Blog
Engineering at Meta
Engineering at Meta
C
Cybersecurity and Infrastructure Security Agency CISA
V
Vulnerabilities – Threatpost
罗磊的独立博客
Jina AI
Jina AI
博客园 - 【当耐特】
C
CERT Recently Published Vulnerability Notes
G
GRAHAM CLULEY
Y
Y Combinator Blog
L
LangChain Blog
L
LINUX DO - 热门话题
宝玉的分享
宝玉的分享
月光博客
月光博客
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
H
Help Net Security
云风的 BLOG
云风的 BLOG
C
CXSECURITY Database RSS Feed - CXSecurity.com
博客园_首页
A
About on SuperTechFans
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Latest news
Latest news
T
Threatpost
T
Tenable Blog
有赞技术团队
有赞技术团队
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Stack Overflow Blog
Stack Overflow Blog
C
Cisco Blogs
C
Check Point Blog
T
Tor Project blog
T
Threat Research - Cisco Blogs
T
The Exploit Database - CXSecurity.com
S
Schneier on Security
美团技术团队
I
Intezer
S
Securelist
AWS News Blog
AWS News Blog

Tomas Vondra

Some more thoughts on random_page_cost How are committers selected? The real cost of random I/O The AI inversion Stabilizing Benchmarks Don't give Postgres too much memory (even on busy systems) Qubes OS is pretty great Wireguard to access a home network Don't give Postgres too much memory Tuning AIO in PostgreSQL 18 Using JWT to establish a trusted context for RLS Fun and weirdness with SSDs So why don't we pick the optimal query plan? How often is the query plan optimal? Benchmarking is hard, sometimes ... Advanced Patch Feedback Session (APFS) at pgconf.dev 2025 [PATCH IDEA] adaptive execution for `IN` queries 15 years of Prague PostgreSQL Developer Day Performance archaeology: OLAP Performance archaeology: OLTP Tuning the glibc memory allocator (for Postgres) [PATCH IDEA] parallel pgbench -i Playing with BOLT and Postgres [PATCH IDEA] amcheck support for BRIN indexes Writing a good talk proposal [PATCH IDEA] Statistics for the file descriptor cache Office hours experiment [PATCH IDEA] Using COPY for postgres_fdw INSERT batching Importing Postgres mailing list archives How to pick the first patch? Will Postgres development rely on mailing lists forever? The state of the Postgres community
Good time to test io_method (for Postgres 18)
2025-05-12 · via Tomas Vondra

We’re now in the “feature freeze” phase of Postgres 18 development. That means no new features will get in - only bugfixes and cleanups of already committed changes. The goal is to test and stabilize the code before a release. PG 18 beta1 was released a couple days ago, so it’s a perfect time to do some testing and benchmarking.

One of the fundamental changes in PG 18 is going to be support for asynchronous I/O. And with beta1 out, it’s the right time to run your tests and benchmarks to test this new feature. Both for correctness and regression.

Until now Postgres did only synchronous file I/O, using the traditional API read(), write() and a couple variants. A couple places also did explicit prefetching by calling posix_fadvise, but I wouldn’t count that as proper async I/O. For a long time this worked well enough, but we’ve been hitting more and more limitations of synchronous I/O.

Lukas Fittl published a really nice introduction, explaining the basics of how it works, why, how to collect and interpret stats, and so on. It’s a really nice explanation, clearer than I could write - and now I don’t have to. Go read it.

I’m not sure I’d describe async I/O as a performance improvement, but the other goals are more about development and internals, so users will probably see it that way.

It however also brings some new configuration options:

  • io_method - How is the async I/O actually handled?

  • io_workers - Number of I/O workers for io_method = worker.

The question is what should be the defaults for these parameters, and we need some help with that.

The io_method has three possible values:

  • sync - Regular sync I/O with prefetching using fadvise, and each backend is performing its I/O. This is the “backwards compatibility” choice, it’s as close to PG17 as possible.

  • worker - There’s a pool of I/O workers performing the I/O. Backends queue requests, workers handle them and notify the backends. The number of workers is set by io_workers, by default 3.

  • io_uring - Uses liburing to pass I/O requests to the kernel io_uring interface. This is the most modern option, but also optional (requires --with-liburing).

There is no “correct” default value. Each option has its pros and cons, and may work depending on the hardware, workload, etc. For now the default is worker with 3 workers, but that’s temporary. We wanted to test with the “properly” asynchronous methods, and the io_uring is optional (and not available on some platforms).

We’ll need to pick the actual default in a couple months, perhaps in July or so.

And this is where you can help! Do you have some sort of test suite for your application (running on Postgres)? Even better if you have some benchmarks with I/O intensive queries, or less common hardware.

Please try running that on PG 18 with different io_method and io_workers values, and let us know. Did it work? Was it faster or slower?

Perhaps you have other arguments for picking a particular default value? For example, worker has the benefit that the worker processes are not responsible just for the I/O, but also for tasks like checksum verification. Which PG 18 enables by default for new clusters, and the verification costs a bit of CPU time.

Conclusions

Help us with stabilizing PG 18, and with figuring out the defaults for io_method and io_worker. Install the beta1, and run as many tests and benchmarks as possible. Ideally, you’d have some application specific test/benchmark. Now is a great time to run it on PG 18 beta1, and report the interesting results to pgsql-hackers.

Do you have feedback on this post? Please reach out by e-mail to tomas@vondra.me.