sNIP Posted March 13, 2020 Report Posted March 13, 2020 Currently I have one main nodejs app, which spawns one nodejs process for each account. The communication is done by IPC protocol. So my question is: Is it going to be better if I just create multiple steam user instances and place them in an array or in an object collection? Quote
Dr. McKay Posted March 15, 2020 Report Posted March 15, 2020 It's very much not a bad idea to spawn one process per account. That way, if something causes one bot to crash, the rest don't also crash. Also, Node.js is single-threaded, so that's the best way to take advantage of multiple processor cores. About the only downside of spawning multiple processes is the increased memory usage. But if you have enough RAM, go for it. sNIP and vrtgn 2 Quote
sNIP Posted March 18, 2020 Author Report Posted March 18, 2020 (edited) This is the test that I made with 45 test IPC processes. The test consist of sending and expecting to receive message every 1 second. I have tested the execution of the time a message goes to the child process and then waiting for that message to come back to the parent process. The transaction time doesnt exceed 1 second. It takes average ~80 mb per process. So if I want to save ram, I need to run them in one process(multiple instances of steam user class). My only concern about spawning multiple processes is that I dont know if I will hit an IPC bottleneck. What happens if a parent process have 500 child processes, which he needs to have constant connection to them? Iam not sure if it will be actually OS related. If that is the case, I need to spawn a process which spawns a process. Edited March 18, 2020 by sNIP Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.