I have a shell script run by some python code using imagemagick's convert to
resize images.  If I run the python code from the cli, it uses 4 cpu cores.  If
I run the script through a webpage via nginx+uwsgi it uses 1 core.  If I set
'cpu-affinity' to '2', convert uses two cores.  Any value higher than 2 results
in two cores being used.  Is uWSGI limiting the number of cores used?  nginx?


Operating system:   Arch Linux
CPU architecture:   x64
Webserver:          nginz
uWSGI version:      2.0.1

$ cat /etc/uwsgi/common.ini
[uwsgi]
print = @@@ %n.ini loading @@@
strict = true
socket = /tmp/%(my_config_name).socket
chmod-socket = 666
chown-socket = http:http
plugins = python2
mount = /=wsgihandler:application
processes = 1
#harakiri = 60 
harakiri = 600 
post-buffering = 4096
cpu-affinity = 2
stats = /tmp/stats.socket
max-requests = 2000
limit-as = 512 
reload-on-as = 256
reload-on-rss = 192
no-orphans = true
enable-threads = true
threads = 4
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to