by chrisseaton · 9y ago · 0 comments
But creating more threads will cause each to run slower as their caches are ruined by each context switch aren't they?
Yes. Even if you are careful to ever run only one process (so: no monitoring, no logging, no VM's, no 'middleware', etc.) and limit the number of threads to strictly equal the number of processors, you still have background kernel threads that force your process to context switch.
Your conclusion is correct. By creating more CPU hungry threads than you have CPUs you will reduce the total throughput of the computer.