Bug 1339720 - RFE: enable "multi_accept" in default configfile events context
Summary: RFE: enable "multi_accept" in default configfile events context
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: nginx
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Nobody's working on this, feel free to take it
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-05-25 17:08 UTC by Gabriel Somlo
Modified: 2020-11-05 09:32 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-06-05 16:05:55 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Gabriel Somlo 2016-05-25 17:08:26 UTC
Description of problem:

Various nginx optimization guidelines all over the Web recommend setting
"use epoll" and "multi_accept on" inside the "events {...}" configuration
context for better performance under load.

As it turns out, "use epoll" is the default choice on recent Linux kernels,
but "multi_accept" is turned off by default, which results in clients
experiencing the server as being sluggish and unresponsive when under load.

Adding "multi_accept on" to the default configuration would allow each worker
to immediately accept all new connections.

http://nginx.org/en/docs/ngx_core_module.html#multi_accept

I believe adding this setting to the default nginx.conf shipping with
Fedora (at least anything >= 24) and EPEL (>= 7) would be beneficial
to almost every user.

TIA for considering this proposal!

diff --git a/nginx.conf b/nginx.conf
index 7fa8133..68c8cf0 100644
--- a/nginx.conf
+++ b/nginx.conf
@@ -11,6 +11,7 @@ pid /run/nginx.pid;
 include /usr/share/nginx/modules/*.conf;

 events {
+    multi_accept on;
     worker_connections 1024;
 }

Comment 1 Jamie Nguyen 2016-06-05 16:05:55 UTC
Hi Gabriel. Thanks for your request. There are some caveats to multi_accept, so I'm not going to add to the default config. The administrator can add if they want.


Note You need to log in before you can comment on or make changes to this bug.