There is no magic rule for setting the number of processes or threads. It is application and system dependent. Do not think using simple math like 2*cpucores will be enough. You need to experiment with various setup an constantly monitor your app. uwsgitop could be a great tool to find the best value.
定义机器工人数量的规则是什么?
从uWsgi docs:
当与nginx一起使用时,nginx.conf中的配置“worker_processes”会这样做吗?
该设置只与nginx相关,不直接影响uwsgi。但是,您可能需要修改此设置,因为您不希望有20个nginx
worker_processes
和只有一个uwsgi工作者。与芹菜+redis一起使用时,“并发性”与此相关?
我通常使用django的manage.py来启动芹菜守护进程,因此这将在uwsgi之外运行。
这个设置中的线程安全性如何?
我需要知道更多细节/细节才能发表评论。
相关问题 更多 >
编程相关推荐