-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add worker-cpu-affinity nginx option #2201
Conversation
worker_cpu_affinity is a common optimization method for improving nginx performance, adding this as a custom configuration. Also fix some format issues found during editing.
@@ -492,6 +496,7 @@ func NewDefault() Configuration { | |||
cfg := Configuration{ | |||
AllowBackendServerHeader: false, | |||
AccessLogPath: "/var/log/nginx/access.log", | |||
WorkerCpuAffinity: "", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use auto
as default. This way you don't need a condition in the template
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have thought about this. However the default nginx behavior is not bind process to any cpus. And if auto
is the default, the condition is still needed if user don't want any binding
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, makes sense
Codecov Report
@@ Coverage Diff @@
## master #2201 +/- ##
==========================================
+ Coverage 36.54% 36.56% +0.01%
==========================================
Files 70 70
Lines 4884 4885 +1
==========================================
+ Hits 1785 1786 +1
Misses 2822 2822
Partials 277 277
Continue to review full report at Codecov.
|
/approve |
@oilbeater thanks! |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: aledbf, oilbeater The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
worker_cpu_affinity is a common optimization method for improving nginx performance, adding this as a custom configuration. Also fix some format issues found during editing.
What this PR does / why we need it:
worker_cpu_affinity is a common optimization method for improving nginx performance, adding this as a custom configuration. Also fix some format issues found during editing.