I have an application that runs lengthy processes. To make it faster, I make a simple outline of the data and want to run it in parallel, simply using the .fork () 2 instance of the same application.
I have a machine with two cores, and I want to make sure that 2 cores are used and the first instance runs on the first core, the second on the second core.
I know about the cluster module, but in this case it seems to be irrelevant, since I do not need HTTP services and load balancing between them. Theyβre just workers (which means they donβt need to communicate with each other, send messages or anything else - they just perform HTTP requests and store data in a database).
Is it even possible to control which processor core the node.js process would run? How to track this on Mac / Linux?
Alexander Beletsky
source share