Skip to content

[Bug]: Is worker_processes of NGINX Ingress automatically set according to node’s physical cores instead of pod CPU limit? #8500

@SonNgo2211

Description

@SonNgo2211

Version

5.0.0

What Kubernetes platforms are you running on?

Other

Steps to reproduce

Hi team,

I read the discussion at kubernetes/ingress-nginx#11518 regarding the worker_processes setting in ingress-nginx. It seems that when worker_processes is set to auto, the number of worker processes is determined by the number of physical CPU cores of the node, not by the CPU limit assigned to the NGINX pod/container in Kubernetes. This leads to a situation where a pod with e.g. 1.5 CPU limit may spawn many workers if the node is large, possibly causing CPU throttle and inefficiency.

  • Does NGINX (inside the controller pod) automatically detect host physical cores, or does it respect the container's CPU limit when calculating worker processes in auto mode?
  • How does the controller recommend setting worker_processes for best efficiency and compatibility with CPU-limited pods?

Any suggestions or insights from the community would be highly appreciated.
Thank you all in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    proposalAn issue that proposes a feature request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions