Skip to content
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

Merged
merged 1 commit into from
Mar 16, 2018

Conversation

oilbeater
Copy link
Contributor

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.

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.
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Mar 16, 2018
@@ -492,6 +496,7 @@ func NewDefault() Configuration {
cfg := Configuration{
AllowBackendServerHeader: false,
AccessLogPath: "/var/log/nginx/access.log",
WorkerCpuAffinity: "",
Copy link
Member

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

Copy link
Contributor Author

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

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, makes sense

@codecov-io
Copy link

Codecov Report

Merging #2201 into master will increase coverage by 0.01%.
The diff coverage is 92.85%.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
internal/ingress/controller/config/config.go 98% <100%> (+0.02%) ⬆️
internal/file/bindata.go 43.07% <100%> (ø) ⬆️
internal/ingress/controller/template/configmap.go 74.46% <90%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d27a132...ae667e8. Read the comment docs.

@aledbf
Copy link
Member

aledbf commented Mar 16, 2018

/approve

@aledbf
Copy link
Member

aledbf commented Mar 16, 2018

@oilbeater thanks!

@k8s-ci-robot
Copy link
Contributor

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 16, 2018
@aledbf aledbf merged commit 41cefeb into kubernetes:master Mar 16, 2018
ElvinEfendi pushed a commit to Shopify/ingress that referenced this pull request Mar 16, 2018
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.
@oilbeater oilbeater deleted the feat/cpu-affinity branch March 17, 2018 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants