I want to use Nodejs Worker threads to handle cpu intensive tasks. I will create a pool of workers available for this.
My question is: How many workers should I spawn in the pool?
Assuming I have a 4 cores, 8 threads cpu - should I spawn a max of 3 or 7 workers (based on cores or threads)? I assume that I have to keep 1 core/thread free for the main process.