You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/11/02 02:05:27 UTC

[GitHub] [apisix-helm-chart] lzxuan opened a new issue, #386: change: default enableCPUAffinity to false

lzxuan opened a new issue, #386:
URL: https://github.com/apache/apisix-helm-chart/issues/386

   Following the merged change at https://github.com/apache/apisix/pull/8074.
   
   NGINX gets the number of CPU cores via `getconf _NPROCESSORS_ONLN`, which in turn reads from `/sys/devices/system/cpu/online`. In a containerization environment, this is mounted directly from the host, and the cgroups doesn't have any effect on this value. As such, setting `.nginx.enableCPUAffinity` to `true` (`worker_processes auto;` in NGINX config) by default will affect the behavior of APISIX, for instance, the performance degrades significantly when running multiple APISIX containers (NGINX worker processes) on the same host, as they are bound to the same CPU cores.
   
   Additional note, due to the same reason, defaulting `.nginx.workerProcesses` to `auto` will also impact the performance, for example, when `.apisix.resources.limits.cpu` is configured.
   
   A possible workaround is to set `.nginx.enableCPUAffinity` to `false` when installing APISIX as a deployment kind (which is the default), and set `.nginx.workerProcesses` to the same number of CPU cores specified in `.apisix.resources.limits.cpu`.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org