3 ms·
He should really be using dstat (or something like that) to show number of context switches per second. His benchmark is mostly a measurement of Linux kernel t
by vicaya 16y ago
He should really be using dstat (or something like that) to show number of context switches per second.
His benchmark is mostly a measurement of Linux kernel thread context switching, which is a lot slower across cores/cpus. I suspect that if he tweaked the Linux kernel HZ to 1000, he'll see another 3-4x improvement.
In most real world servers, the threads are actually doing something real like updating some complex data structure and doing some transformation (encoding/decoding.), etc., which would made context switching overhead less of a problem.
However the benchmark does illustrate the importance of context switching performance for certain workloads.