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/10/08 05:11:43 UTC

[GitHub] [apisix] spacewander opened a new issue, #8042: feat: As a user, I want to set enable_cpu_affinity default to false, so that it won't affect running APISIX via container

spacewander opened a new issue, #8042:
URL: https://github.com/apache/apisix/issues/8042

   ### Description
   
   Nowadays, more and more users deploy APISIX via container. As Nginx's worker_cpu_affinity doesn't count with cgroup, enabling worker_cpu_affinity by default will affect the behavior of APISIX, for instance, multiple instances will be bound to one CPU. To avoid this problem, it would be better to disable CPU affinity option by default in the `conf/config-default.yaml`.
   
   The worker_processes option also has a similar problem, but changing this option will bring enormous breaking change.


-- 
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


[GitHub] [apisix] tokers commented on issue #8042: feat: As a user, I want to set enable_cpu_affinity default to false, so that it won't affect running APISIX via container

Posted by GitBox <gi...@apache.org>.
tokers commented on issue #8042:
URL: https://github.com/apache/apisix/issues/8042#issuecomment-1273974468

   > In kubernetes, nginx spawn worker processes depending on the resource request for the pod by default. e.g if you have the following in your deployment:
   
   Any docs about it?


-- 
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

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


[GitHub] [apisix] kellyseeme commented on issue #8042: feat: As a user, I want to set enable_cpu_affinity default to false, so that it won't affect running APISIX via container

Posted by GitBox <gi...@apache.org>.
kellyseeme commented on issue #8042:
URL: https://github.com/apache/apisix/issues/8042#issuecomment-1272276205

   how worker_processes set in k8s enviroment? if there set the cpu and mem request and limit.


-- 
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

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


[GitHub] [apisix] Hazel6869 commented on issue #8042: feat: As a user, I want to set enable_cpu_affinity default to false, so that it won't affect running APISIX via container

Posted by GitBox <gi...@apache.org>.
Hazel6869 commented on issue #8042:
URL: https://github.com/apache/apisix/issues/8042#issuecomment-1272506288

   > 
   
   Hi, can you assign the issue to me ?  @spacewander 


-- 
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

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


[GitHub] [apisix] tokers commented on issue #8042: feat: As a user, I want to set enable_cpu_affinity default to false, so that it won't affect running APISIX via container

Posted by GitBox <gi...@apache.org>.
tokers commented on issue #8042:
URL: https://github.com/apache/apisix/issues/8042#issuecomment-1272302342

   > how worker_processes set in k8s enviroment? if there set the cpu and mem request and limit.
   
   The default value of worker_processes is `auto` (see https://github.com/apache/apisix-helm-chart/blob/master/charts/apisix/values.yaml#L214) if you install APISIX via helm chart.


-- 
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

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


[GitHub] [apisix] kellyseeme commented on issue #8042: feat: As a user, I want to set enable_cpu_affinity default to false, so that it won't affect running APISIX via container

Posted by GitBox <gi...@apache.org>.
kellyseeme commented on issue #8042:
URL: https://github.com/apache/apisix/issues/8042#issuecomment-1273145725

   @tokers  thanks for reply,maybe the woker_processes is the relevent topic.if we set auto,this worker_processes is set to the node of the number cpus,maybe this is not resonable。
   
   In kubernetes, nginx spawn worker processes depending on the resource request for the pod by default. e.g if you have the following in your deployment:
   
   resources:
     requests:
       memory: 2048Mi
       cpu: 2000m
   Then nginx will spawn 2 worker process (2000 milli cpu = 2 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

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


[GitHub] [apisix] spacewander closed issue #8042: feat: As a user, I want to set enable_cpu_affinity default to false, so that it won't affect running APISIX via container

Posted by GitBox <gi...@apache.org>.
spacewander closed issue #8042: feat: As a user, I want to set enable_cpu_affinity default to false, so that it won't affect running APISIX via container
URL: https://github.com/apache/apisix/issues/8042


-- 
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

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


[GitHub] [apisix] tokers commented on issue #8042: feat: As a user, I want to set enable_cpu_affinity default to false, so that it won't affect running APISIX via container

Posted by GitBox <gi...@apache.org>.
tokers commented on issue #8042:
URL: https://github.com/apache/apisix/issues/8042#issuecomment-1272302484

   > > how worker_processes set in k8s enviroment? if there set the cpu and mem request and limit.
   > 
   > The default value of worker_processes is `auto` (see https://github.com/apache/apisix-helm-chart/blob/master/charts/apisix/values.yaml#L214) if you install APISIX via helm chart.
   
   The number of APISIX worker processes is not related to the CPU / memory request & limitation. By the way, this is off the topic.


-- 
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

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