3 ms·
We did a huge amount of benchmarking for Java Threads used in a very large data processing node. You're comment about the costs of context switching are borne
by smoyer 12y ago
We did a huge amount of benchmarking for Java Threads used in a very large data processing node. You're comment about the costs of context switching are borne out by our tests. We found that the best number of threads was equal to the number of CPUs in the node plus one. Any more threads decreased the throughput due to context switching (it was linear with our application ... to a point). Any fewer threads resulted in idle CPU.