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 2020/10/22 03:26:45 UTC

[GitHub] [apisix] membphis commented on a change in pull request #2153: Change: worker and cpu optimization

membphis commented on a change in pull request #2153:
URL: https://github.com/apache/apisix/pull/2153#discussion_r509857609



##########
File path: .travis/apisix_cli_test.sh
##########
@@ -408,3 +408,36 @@ if ! grep "lua_shared_dict my_dict 1m;" conf/nginx.conf > /dev/null; then
 fi
 
 echo "passed: found 'my_dict' in nginx.conf"
+
+# check disable cpu affinity
+git checkout conf/config.yaml
+
+echo '
+nginx_config:
+  enable_cpu_affinity: false
+' > conf/config.yaml
+
+make init
+
+count=`grep -c "worker_cpu_affinity" conf/nginx.conf  || true`
+if [ $count -ne 0 ]; then
+    echo "failed: nginx.conf file disable cpu affinity"
+    exit 1
+fi
+
+echo "passed: nginx.conf file disable cpu affinity"
+
+# set worker processes with env
+git checkout conf/config.yaml
+
+export APIX_WORKER_PROCESSES=8
+
+make init
+
+count=`grep -c "worker_processes 8;" conf/nginx.conf || true`
+if [ $count -ne 1 ]; then
+    echo "failed: worker_processes is not 8 when using env to set worker processes"
+    exit 1
+fi
+
+echo "passed: worker_processes is not 8 when using env to set worker processes"

Review comment:
       bad description




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

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