PostgreSQL Database Lands Initial Support For IO_uring: "Can Be Considerably Faster"
([Linux Storage] 18 Minutes Ago
PostgreSQL + IO_uring)
- Reference: 0001537115
- News link: https://www.phoronix.com/news/PostgreSQL-Lands-IO_uring
- Source link:
As a very exciting improvement for the open-source PostgreSQL database server, it has merged initial support for making use of [1]IO_uring on Linux servers for asynchronous I/O and can provide for some nice performance improvements.
The very initial support for using IO_uring has been merged to PostgreSQL Git as of yesterday, 26 March. This is a very exciting feature addition ahead of PostgreSQL 18 to be introduced later in the year.
This IO_uring support requires building PostgreSQL Git with the "--with-liburing" for building against IO_uring's liburing library. This Linux-specific feature also requires setting the "io_method=io_uring" PostgreSQL option for using IO_uring as the database server's I/O method.
[2]This commit added the optional liburing build dependency and then [3]this follow-up commit is what goes ahead with the integration and adding the io_method=io_uring option. That commit explains:
"aio: Add io_method=io_uring
Performing AIO using io_uring can be considerably faster than io_method=worker, particularly when lots of small IOs are issued, as
a) the context-switch overhead for worker based AIO becomes more significant
b) the number of IO workers can become limiting
io_uring, however, is linux specific and requires an additional compile-time dependency (liburing).
This implementation is fairly simple and there are substantial optimization opportunities."
Prior [4]discussions around IO_uring for PostgreSQL have shown off some very nice potential of the IO_uring/liburing path:
And there's even room left for further performance optimizations.
It's very exciting seeing this IO_uring support merged for mainline PostgreSQL and will be interesting to see how well-tuned the IO_uring method is by the time of the PostgreSQL 18.0 release. PostgreSQL 18.0 should be debuting in September.
[1] https://www.phoronix.com/search/IO_uring
[2] https://github.com/postgres/postgres/commit/8eadd5c73c44708ecd45b9fd3ac54a550511d16f
[3] https://github.com/postgres/postgres/commit/c325a7633fcb33dbd73f46ddbbe91e95ddf3b227
[4] https://www.postgresql.org/message-id/uvrtrknj4kdytuboidbhwclo4gxhswwcpgadptsjvjqcluzmah%40brqs62irg4dt
The very initial support for using IO_uring has been merged to PostgreSQL Git as of yesterday, 26 March. This is a very exciting feature addition ahead of PostgreSQL 18 to be introduced later in the year.
This IO_uring support requires building PostgreSQL Git with the "--with-liburing" for building against IO_uring's liburing library. This Linux-specific feature also requires setting the "io_method=io_uring" PostgreSQL option for using IO_uring as the database server's I/O method.
[2]This commit added the optional liburing build dependency and then [3]this follow-up commit is what goes ahead with the integration and adding the io_method=io_uring option. That commit explains:
"aio: Add io_method=io_uring
Performing AIO using io_uring can be considerably faster than io_method=worker, particularly when lots of small IOs are issued, as
a) the context-switch overhead for worker based AIO becomes more significant
b) the number of IO workers can become limiting
io_uring, however, is linux specific and requires an additional compile-time dependency (liburing).
This implementation is fairly simple and there are substantial optimization opportunities."
Prior [4]discussions around IO_uring for PostgreSQL have shown off some very nice potential of the IO_uring/liburing path:
And there's even room left for further performance optimizations.
It's very exciting seeing this IO_uring support merged for mainline PostgreSQL and will be interesting to see how well-tuned the IO_uring method is by the time of the PostgreSQL 18.0 release. PostgreSQL 18.0 should be debuting in September.
[1] https://www.phoronix.com/search/IO_uring
[2] https://github.com/postgres/postgres/commit/8eadd5c73c44708ecd45b9fd3ac54a550511d16f
[3] https://github.com/postgres/postgres/commit/c325a7633fcb33dbd73f46ddbbe91e95ddf3b227
[4] https://www.postgresql.org/message-id/uvrtrknj4kdytuboidbhwclo4gxhswwcpgadptsjvjqcluzmah%40brqs62irg4dt
phoronix