Skip to content

nginx: conf: performance tuning for nginx.conf#17406

Draft
kgodara912 wants to merge 1 commit into
3.0-devfrom
kgodara/3.0-dev/nginx_perf
Draft

nginx: conf: performance tuning for nginx.conf#17406
kgodara912 wants to merge 1 commit into
3.0-devfrom
kgodara/3.0-dev/nginx_perf

Conversation

@kgodara912
Copy link
Copy Markdown
Contributor

@kgodara912 kgodara912 commented May 22, 2026

Set worker_processes to auto with CPU affinity and enable tcp_nopush for improved performance.

Merge Checklist

All boxes should be checked before merging the PR (just tick any boxes which don't apply to this PR)

  • The toolchain has been rebuilt successfully (or no changes were made to it)
  • The toolchain/worker package manifests are up-to-date
  • Any updated packages successfully build (or no packages were changed)
  • Packages depending on static components modified in this PR (Golang, *-static subpackages, etc.) have had their Release tag incremented.
  • Package tests (%check section) have been verified with RUN_CHECK=y for existing SPEC files, or added to new SPEC files
  • All package sources are available
  • cgmanifest files are up-to-date and sorted (./cgmanifest.json, ./toolkit/scripts/toolchain/cgmanifest.json, .github/workflows/cgmanifest.json)
  • LICENSE-MAP files are up-to-date (./LICENSES-AND-NOTICES/SPECS/data/licenses.json, ./LICENSES-AND-NOTICES/SPECS/LICENSES-MAP.md, ./LICENSES-AND-NOTICES/SPECS/LICENSE-EXCEPTIONS.PHOTON)
  • All source files have up-to-date hashes in the *.signatures.json files
  • sudo make go-tidy-all and sudo make go-test-coverage pass
  • Documentation has been updated to match any changes to the build system
  • Ready to merge

Summary

Set worker_processes to auto with CPU affinity and enable tcp_nopush for improved performance. This improves multiple connection performance of nginx.

Change Log
  • Improvement in multicore performance of nginx
Does this affect the toolchain?

NO

Associated issues
  • #xxxx
Links to CVEs
Test Methodology

Set worker_processes to auto with CPU affinity and enable tcp_nopush
for improved performance.
@microsoft-github-policy-service microsoft-github-policy-service Bot added Packaging 3.0-dev PRs Destined for AzureLinux 3.0 labels May 22, 2026
@kgodara912 kgodara912 changed the title conf: performance tuning for nginx.conf nginx: conf: performance tuning for nginx.conf May 22, 2026
@kgodara912
Copy link
Copy Markdown
Contributor Author

Fedora keeps their own nginx config file, should we replicate that? That has these changes as well. Following is the fedora config from source rpm,

user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log notice;
pid /run/nginx.pid;

# Load dynamic modules. See /usr/share/doc/nginx/README.dynamic.
include /usr/share/nginx/modules/*.conf;

events {
    worker_connections 1024;
}

http {
    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    access_log  /var/log/nginx/access.log  main;

    sendfile            on;
    tcp_nopush          on;
    keepalive_timeout   65;
    types_hash_max_size 4096;

    include             /etc/nginx/mime.types;
    default_type        application/octet-stream;

    server {
        listen       80;
        listen       [::]:80;
        server_name  _;
        root         /usr/share/nginx/html;

        # Load configuration files for the default server block.
        include /etc/nginx/default.d/*.conf;
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3.0-dev PRs Destined for AzureLinux 3.0 Packaging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant