November 24, 2020 04:10AM
SoYun,

Interesting patchset. Have you by chance also tested proxy_pass /
fastcgi_pass performance?

I'd be interested to know if the significant performance improvement was
due to filesystem interaction or socket.

Regards,
Mathew


On Tue, 24 Nov 2020 at 19:43, SoYun Seong <thdbsdox12@gmail.com> wrote:

> # HG changeset patch
> # User SoYun Seong <thdbsdox12@gmail.com>
> # Date 1606129415 0
> # Mon Nov 23 11:03:35 2020 +0000
> # Node ID d7420a5777b63c8a8cfb7e98a522893490995510
> # Parent 09dfe4a92414513c6bd3c18d871e8a76ed19c3d7
> new io_uring event module.
>
> I implemented ngx_uring_module using Linux io_uring API to improve
> performance of Nginx for Linux by minimizing system calls. There are
> performance improvements in both request/sec and average latency. The
> result is located at https://github.com/dachshu/nginx.
>
> However, there are some places that uses local variable buffer(stack) to
> recv and send data. To do asynchronous IO, recv and send buffers should be
> located at safe memory(like heap, data). Therefore it is needed to make
> these codes to use allocated memory from memory pool when using
> asynchronous IO.
>
> Also I am working on improve performance of Nginx for Windows using
> Registered IO and IOCP.
>
> diff -r 09dfe4a92414 -r d7420a5777b6 auto/os/linux
> --- a/auto/os/linux Mon Nov 23 11:01:36 2020 +0000
> +++ b/auto/os/linux Mon Nov 23 11:03:35 2020 +0000
> @@ -89,6 +89,30 @@
> fi
>
>
> +# io_uring
> +
> +ngx_feature="uring"
> +ngx_feature_name="NGX_HAVE_URING"
> +ngx_feature_run=yes
> +ngx_feature_incs="#include <liburing.h>"
> +ngx_feature_path="-I src/liburing/src/include/"
> +ngx_feature_libs="-L src/liburing/src/ -luring"
> +ngx_feature_test="struct io_uring ring;
> + struct io_uring_params params;
> + if (io_uring_queue_init_params(32768, &ring, &params) <
> 0) return 1;
> + if (!(params.features & IORING_FEAT_FAST_POLL)) return
> 1;"
> +. auto/feature
> +
> +if [ $ngx_found = yes ]; then
> + have=NGX_HAVE_CLEAR_EVENT . auto/have
> + CORE_SRCS="$CORE_SRCS $URING_SRCS"
> + CORE_INCS="$CORE_INCS $ngx_feature_path"
> + CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
> + EVENT_MODULES="$EVENT_MODULES $URING_MODULE"
> + EVENT_FOUND=YES
> +fi
> +
> +
> # O_PATH and AT_EMPTY_PATH were introduced in 2.6.39, glibc 2.14
>
> ngx_feature="O_PATH"
> diff -r 09dfe4a92414 -r d7420a5777b6 auto/sources
> --- a/auto/sources Mon Nov 23 11:01:36 2020 +0000
> +++ b/auto/sources Mon Nov 23 11:03:35 2020 +0000
> @@ -120,6 +120,9 @@
> EPOLL_MODULE=ngx_epoll_module
> EPOLL_SRCS=src/event/modules/ngx_epoll_module.c
>
> +URING_MODULE=ngx_uring_module
> +URING_SRCS=src/event/modules/ngx_uring_module.c
> +
> IOCP_MODULE=ngx_iocp_module
> IOCP_SRCS=src/event/modules/ngx_iocp_module.c
>
> _______________________________________________
> nginx-devel mailing list
> nginx-devel@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx-devel
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[PATCH 8 of 8] new io_uring event module

SoYun Seong 698 November 24, 2020 03:46AM

Re: [PATCH 8 of 8] new io_uring event module

splitice 442 November 24, 2020 04:10AM

Re: Re: [PATCH 8 of 8] new io_uring event module

성소윤 447 November 25, 2020 07:44AM

Re: Re: [PATCH 8 of 8] new io_uring event module

성소윤 351 December 01, 2020 06:00AM

Re: [PATCH 8 of 8] new io_uring event module

Vladimir Homutov 330 November 30, 2020 09:40AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 173
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready