Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be unavailable on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 1339720 - RFE: enable "multi_accept" in default configfile events context
Summary: RFE: enable "multi_accept" in default configfile events context
Alias: None
Product: Fedora
Classification: Fedora
Component: nginx
Version: rawhide
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Nobody's working on this, feel free to take it
QA Contact: Fedora Extras Quality Assurance
Depends On:
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:
Last Closed: 2016-06-05 16:05:55 UTC
Type: Bug

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.


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.