【发布时间】:2018-06-22 12:37:07
【问题描述】:
我正在通过 systemd 将 gunicorn 服务器作为服务运行,这是示例 service 文件:
[Unit]
Description=Gunicorn NGINX
After=network.target
[Service]
User=root
Group=www-data
WorkingDirectory=/test
ExecStart=/usr/local/bin/gunicorn --workers 8 --threads 8 --backlog 100 --bind 10.0.0.20:5000 -m 777 abc:app
Restart=always
[Install]
WantedBy=multi-user.target
我现在想使用 shell 命令将 --workers 和 --threads 附近的数字替换为内核数,以便动态选择内核数
nproc --all
有人能帮我怎么做吗
【问题讨论】: