I'm running online servers for a physics-based game with a backend in Node.js. Currently, the server can handle 10 games/worlds at a time before the next tick needs to be executed.
With this in mind, I have tight scheduling using nanotimer so that the world steps don't step on each other's toes, but the ordering also means that I can only run on one processor, so my AWS instances are only sitting at about 55% CPU utilization.
I decided using taskset would be a good way of going about using both processors on my instance, but sometimes the worlds are blocked from processing for several seconds at times by what I imagine is another exterior process running.
How can I prevent this from happening? If I'm using two of the processors (without taskset), the one set of worlds runs just fine, but I'm only using 55% of my processor, which is really expensive.