Skip to content
Permalink
Browse files

add NGINX_IOURING_PATCH variable support in 123.09beta01

- For Nginx 1.17.0+ and Linux Kernel 5.1 usage only when NGINX_IORURING_PATCH='y' is enabled via persistent config file /etc/centminmod/custom_config.inc setting prior to centmin.sh menu option 4 nginx compiles (disabled by default), apply patch to allow Nginx AIO https://nginx.org/en/docs/http/ngx_http_core_module.html#aio to use Linux Kernel 5.1's new io_uring interface to support more efficient buffered AIO with less system calls https://lwn.net/Articles/776703/ & https://hub.packtpub.com/linux-5-1-out-with-io_uring-io-interface-persistent-memory-new-patching-improvements-and-more-2/
- Obviously, if you remove/downgrade Linux Kernel from 5.1, need to set NGINX_IORURING_PATCH='n', and recompile Nginx via centmin.sh menu option 4 to remove the patch
- Once patched in /usr/local/nginx/conf/nginx.conf need to disable sendfiles and enable aio. The centmin.sh menu option 4 routine will attempt to do this automatically so you can verify if the following is set in nginx.conf when NGINX_IORURING_PATCH='y'  enabled. When NGINX_IORURING_PATCH='n' set, centmin.sh menu option 4 routine will attempt to remove aio on and turn sendfile on again.

sendfile off;
aio on;
  • Loading branch information...
centminmod committed Aug 6, 2019
1 parent 9552be8 commit cfbfb2e0629182025d3b8b8b1000e164b42b75aa
Showing with 545 additions and 15 deletions.
  1. +2 −1 centmin.sh
  2. +1 −0 example/custom_config.inc
  3. +18 −14 inc/nginx_configure.inc
  4. +40 −0 inc/nginx_patch.inc
  5. +484 −0 patches/nginx/nginx_io_uring.patch
@@ -27,7 +27,7 @@ DT=$(date +"%d%m%y-%H%M%S")
branchname='123.09beta01'
SCRIPT_MAJORVER='1.2.3'
SCRIPT_MINORVER='09'
SCRIPT_INCREMENTVER='228'
SCRIPT_INCREMENTVER='229'
SCRIPT_VERSIONSHORT="${branchname}"
SCRIPT_VERSION="${SCRIPT_VERSIONSHORT}.b${SCRIPT_INCREMENTVER}"
SCRIPT_DATE='31/07/2019'
@@ -501,6 +501,7 @@ NSD_INSTALL='n' # Install NSD (DNS Server)
NSD_VERSION='3.2.18' # NSD Version
NTP_INSTALL='y' # Install Network time protocol daemon
NGINXPATCH='y' # Set to y to allow NGINXPATCH_DELAY seconds time before Nginx configure and patching Nginx
NGINX_IOURING_PATCH='n' # Experimental Nginx AIO patch for Linux 5.1+ Kernel systems only
NGINXPATCH_DELAY='1' # Number of seconds to pause Nginx configure routine during Nginx upgrades
STRIPNGINX='y' # set 'y' to strip nginx binary to reduce size
NGXMODULE_ALTORDER='y' # nginx configure module ordering alternative order
@@ -118,6 +118,7 @@ NSD_INSTALL='y' # Install NSD (DNS Server)
NSD_VERSION='3.2.18' # NSD Version
NTP_INSTALL='y' # Install Network time protocol daemon
NGINXPATCH='y' # Set to y to allow NGINXPATCH_DELAY seconds time before Nginx configure and patching Nginx
NGINX_IOURING_PATCH='n' # Experimental Nginx AIO patch for Linux 5.1+ Kernel systems only
NGINXPATCH_DELAY='1' # Number of seconds to pause Nginx configure routine during Nginx upgrades
STRIPNGINX='y' # set 'y' to strip nginx binary to reduce size
NGXMODULE_ALTORDER='y' # nginx configure module ordering alternative order

0 comments on commit cfbfb2e

Please sign in to comment.
You can’t perform that action at this time.