1名工人的枪支最大线程
用枪支工人和线程而言,我需要知道是否有最大线程可以分配给一个工人?我已经为交易机器人的UI部分提供了烧瓶应用程序。它的作用允许用户创建交易机器人的新实例,当创建新实例时,将其添加为新线程。有一个机器人管理器,允许以线程为单位停止和启动机器人实例,并跟踪运行线程。
应用程序已扩展。 Gunicorn在一个工人身上运行(因为工人在他们之间没有共享记忆,或者是机器人经理可以与其他工人交谈的方法?)。我可以从一个工人开始几个线程?我应该指定枪支的线程数吗?
目前,枪支被以下命令驱动:
gunicorn app:application --worker-tmp-dir /dev/shm --bind 0.0.0.0:8000 --timeout 600 --workers 1
我可以开始说一个单个工人的8个线程吗?它将获得什么好处?
gunicorn app:application --worker-tmp-dir /dev/shm --bind 0.0.0.0:8000 --timeout 600 --workers=1 --threads=8
In terms if Gunicorn workers and threads I need to know if there is a maximum threads that can be assigned to a single worker? I've a flask application for the UI part of a trading bot. What it does it allows the user to create new instances of a trading bot and when a new instance is created, it is added as a new thread. There is a bot manager that allows to stop and start bot instances as threads and also keep track of running threads.
App is dockerized. Gunicorn runs on a single worker (since workers don't share memory between them, or is there a way for the bot manager to speak with other workers?). How many threads can I start on a single worker? Should I specify number of threads for gunicorn?
Currently gunicorn is fired up with following command:
gunicorn app:application --worker-tmp-dir /dev/shm --bind 0.0.0.0:8000 --timeout 600 --workers 1
Can I start lets say 8 threads on a single worker? What benefits will it reap?
gunicorn app:application --worker-tmp-dir /dev/shm --bind 0.0.0.0:8000 --timeout 600 --workers=1 --threads=8
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论