You mention that PinAffinity controls “the cores that everything else in the system is using” and “to confine all of the Windows background tasks to a group of cores”. Since there appears to be a lot of Windows background processes running, wouldn’t it be easier to just select the cores that VP & VPM should use?
The snag in that theory is that Windows will then schedule background tasks on the same cores that you've assigned to VP & VPM, because you haven't told it *not to*. The main thing that PinAffinity does, really, is not to tell VP/VPM where to run, but to tell everything else *not to run there*, so that VP/VPM get those cores to themselves.
Windows uses a sort of peanut butter algorithm by default, trying to spread the load evenly. That's a good generic algorithm for a mix of random tasks, optimizing for overall throughput. But optimizing for throughput comes at the expense of latency. If you want to optimize for latency, you want a different scheduling algorithm: you want those low-latency tasks to be at the front of the scheduling queue every time, and you want to minimize competition from other tasks for the CPU.
I have no idea how threads or cores are assigned, but that almost sounds like if fewer cores or threads are used there would be less scheduling latency & therefore less stutter. IOW assigning a single core to Visual Pinball would be ideal. Apparently that does not appear to be optimal.
I'm not sure where you're coming from on the idea that fewer is better when it comes to threads or cores. If you could explain your reasoning there, I could maybe answer more specifically. I think the intuition most people have is "more is better/faster" when it comes to threads and cores, so you're being a bit contrarian on this point.
But what is recommended if I upgrade to an Intel i5-8400 with 6 real cores? If one core is selected for all the Windows background tasks that leaves 5 cores for VP & VPM. Will that cause too much “thread scheduling latency” & therefore too much stutter? Am I better off using only 4 real cores?
You really have to be empirical on this stuff - try it both ways and see which is better for you. These systems are so complex (in terms of both hardware and software) that it's hard to predict from first principles. From what I've been able to analyze of VP's CPU usage, VP is happiest with at least three cores to itself. Giving it more cores to itself won't be harmful to VP in any way - it really is the more the merrier as far as that goes. But the trade-off is that any core you give exclusively to VP, you're taking away from everything else. And there might be some background tasks where overly throttling them is harmful to VP's performance or responsiveness. I think you get diminishing returns giving more than three or four cores to VP - not a negative impact, just diminishing returns - so if you have cores to burn beyond that, I'd be inclined to think it would be better to give them to the other tasks. So on a 6-core system, I'd probably try a 3/3 and 4/2 partitioning (4/2 = 4 cores to VP, 2 to all else), play a while with each, and see if I could tell any difference.
Edited by mjr, 09 December 2018 - 08:29 PM.