Running multiple instances by supervisor
See original GitHub issueI’m running this script by the supervisor in the background. What will happen if I increase numprocs
to something greater than 1? Will I have an enhance in my speed?
For example the following config:
[program:mtproxy]
command=python3.7 /opt/mtprotoproxy/mtprotoproxy.py
numprocs=10
process_name=%(program_name)s_%(process_num)02d
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Start multiple python processes using supervisor
Run multiple instances of a python program on a single server to make better utilization of server resources.
Read more >Supervisord creating multiple instances - Server Fault
The conf file is creating four instances. Any ideas why this is happening? root@haproxy:/etc/init.d# ps aux | grep haproxy haproxy 18 0.0 1.1 ......
Read more >Supervisord config for running multiple processes in a single ...
Supervisord config for running multiple processes in a single container. - supervisord.conf.
Read more >node.js - Supervisor starts more processes with one command
If I set numprocess to 2 for the example below, the supervisor will try to start the same process twice. Right? [program:cat] command=/bin/cat ......
Read more >What is the right way to run multiple processes from my start ...
Using a worker is the recommended way of starting more than one process. But if you are not able to use a worker...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
the multi-threading is slow, the current approach is the fastest way to multiplex the proxy server on several cores since the multiplexing is done in the linux kernel.
It is better to use many small proxy-servers instead of big because the big one is very easy to block by traffic patterns. Also it if it advertised somewhere it will likely be blocked.
Every process uses a single cpu core. If you have two cores you will get double performance if you run the script twice. If your server has 10 cores, it is better to run the proxy 10 times.
It is valid if you have really lot of users (~5 000) and the proxy process is cpu-bounded. If you have a few users, there will be no difference.