[PATCH] Add io_uring support in AIO(async io) module

Vladimir Homutov vl at nginx.com
Mon Jan 18 07:28:12 UTC 2021


On Thu, Jan 14, 2021 at 05:53:17AM +0000, Zhao, Ping wrote:
> # HG changeset patch
> # User Ping Zhao <ping.zhao at intel.com>
> # Date 1610554205 18000
> #      Wed Jan 13 11:10:05 2021 -0500
> # Node ID 95886c3353dc80a3da215027c1e0f2141e47e911
> # Parent  b055bb6ef87e49232a7fcb4e5334b8efda3b6499
> Add io_uring support in AIO(async io) module.
>
> Hello, This is a patch to support io_uring in AIO(async io) module.
> Basically you don't need change your configurations. If you're using new kernel(above v5.1) which supports io_uring, and you have   "aio on" in your configuration. Nginx will use io_uring for FILE_AIO access which can achieve performance improvement than legacy   libaio.
>
> Checked with iostat which shows nvme disk io has 30%+ performance improvement with 1 thread.
> Use wrk with 100 threads 200 connections(-t 100 -c 200) with 25000 random requests.
>
>                   iostat(B/s)
> libaio        ~1.0 GB/s
> io_uring   1.3+ GB/s

Hello,

what size of request did you use in your testing?
The previous attempt to use uring
(http://mailman.nginx.org/pipermail/nginx-devel/2020-November/013632.html)
seem to have issues with big requests and fallback to sendfile in such
cases. Note that from the standpoint of HTTP server, most requests are
usually larger than 4Kb.


More information about the nginx-devel mailing list