I have 2 sites on my server (debian) with 4 cpu cores.
For both of them I use workers=2
and cpu-affinity=1
so workers are
mapped to cpu 0 and 1 for both sites like that:
spawned uWSGI master process (pid: 19345)
spawned uWSGI worker 1 (pid: 19346, cores: 1)
mapping worker 1 to CPUs: 0
spawned uWSGI worker 2 (pid: 19347, cores: 1)
mapping worker 2 to CPUs: 1
I don't want to use 4 workers (obviously, in this case load would spread equally between all cores) to reduce memory usage so I wonder if I can somehow map workers to specific cpu cores? Taking example above, would be nice to have 0 and 1 cpu mapped to workers of the first site and 2 and 3 for the second one.
Also I found some useful (but not enough) info here: http://lists.unbit.it/pipermail/uwsgi/2011-March/001594.html
Thanks.