Skip to content

Conversation

@myamada9999
Copy link

@myamada9999 myamada9999 commented Sep 12, 2025

  • Does this PR have a descriptive title that could go in our release notes?

  • Should this result in any changes to our documentation, either updating existing docs or adding new ones?

  • Does this PR add any new dependencies?

  • Does this PR modify any existing APIs?

    • Is the change to the API backwards compatible?

Reference Issues/PRs

Nothing.

What does this implement/fix? Briefly explain your changes.

This patch provides a means to switch from aio to io_uring in diskann.
Generally, aio is older, and in recent Linux distributions, io_uring is often adopted due to its superior performance.

https://www.snia.org/sites/default/files/SDC/2019/presentations/Storage_Performance/Kariuki_John_Verma_Vishal_Improved_Storage_Performance_Using_the_New_Linux_Kernel_I.O_Interface.pdf

By installing the liburing-dev package and building with the -DIOURING=True macro, the parts using libaio will be replaced with liburing.

# apt-get install liburing-dev
$ cmake -DIOURING=True -DCMAKE_BUILD_TYPE=Release ..
$ make -j

Using a system with 128 AMD cores and 8 PCIe Gen5 SSDs configured in RAID 0, we compared the QPS between aio and io_uring. We observed a performance improvement of 9% to 27% with fewer than 100 threads. However, once the thread count exceeded 100 and approached the physical CPU core count of 128, we found that aio performed better.

It appears that io_uring is not completely superior to aio, so I implemented a patch to allow switching between aio and io_uring. If you have any other good implementation methods or solutions, please feel free to suggest them.

Any other comments?

Nothing.

BLOCK_SIZE is a generic name,
which causes a conflict when including the io_uring library header.
Probably because the macro definition of BLOCK_SIZE in the kernel header
is included in the io_uring library header.

Signed-off-by: Masahiro Yamada (KIOXIA) <masahiro31.yamada@kioxia.com>
io_uring is enabled by building with -DIOURING.

In the case of aio, io_context_t was defined as the type of IOContext.
io_context_t is a pointer to struct io_context.
io_uring is implemented with the same idea,
defining the type of IOContext as a pointer to struct io_uring.

Signed-off-by: Masahiro Yamada (KIOXIA) <masahiro31.yamada@kioxia.com>
@myamada9999
Copy link
Author

@microsoft-github-policy-service agree company="Kioxia"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant