Skip to content

Commit cfbfb2e

Browse files
committed
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;
1 parent 9552be8 commit cfbfb2e

File tree

5 files changed

+545
-15
lines changed

5 files changed

+545
-15
lines changed

centmin.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ DT=$(date +"%d%m%y-%H%M%S")
2727
branchname='123.09beta01'
2828
SCRIPT_MAJORVER='1.2.3'
2929
SCRIPT_MINORVER='09'
30-
SCRIPT_INCREMENTVER='228'
30+
SCRIPT_INCREMENTVER='229'
3131
SCRIPT_VERSIONSHORT="${branchname}"
3232
SCRIPT_VERSION="${SCRIPT_VERSIONSHORT}.b${SCRIPT_INCREMENTVER}"
3333
SCRIPT_DATE='31/07/2019'
@@ -501,6 +501,7 @@ NSD_INSTALL='n' # Install NSD (DNS Server)
501501
NSD_VERSION='3.2.18' # NSD Version
502502
NTP_INSTALL='y' # Install Network time protocol daemon
503503
NGINXPATCH='y' # Set to y to allow NGINXPATCH_DELAY seconds time before Nginx configure and patching Nginx
504+
NGINX_IOURING_PATCH='n' # Experimental Nginx AIO patch for Linux 5.1+ Kernel systems only
504505
NGINXPATCH_DELAY='1' # Number of seconds to pause Nginx configure routine during Nginx upgrades
505506
STRIPNGINX='y' # set 'y' to strip nginx binary to reduce size
506507
NGXMODULE_ALTORDER='y' # nginx configure module ordering alternative order

example/custom_config.inc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ NSD_INSTALL='y' # Install NSD (DNS Server)
118118
NSD_VERSION='3.2.18' # NSD Version
119119
NTP_INSTALL='y' # Install Network time protocol daemon
120120
NGINXPATCH='y' # Set to y to allow NGINXPATCH_DELAY seconds time before Nginx configure and patching Nginx
121+
NGINX_IOURING_PATCH='n' # Experimental Nginx AIO patch for Linux 5.1+ Kernel systems only
121122
NGINXPATCH_DELAY='1' # Number of seconds to pause Nginx configure routine during Nginx upgrades
122123
STRIPNGINX='y' # set 'y' to strip nginx binary to reduce size
123124
NGXMODULE_ALTORDER='y' # nginx configure module ordering alternative order

0 commit comments

Comments
 (0)