Troubleshooting

A web server with 2 vCPUs is slow. vmstat shows cs above 150000 per second, high sy time, a run queue (r) of 40, and si, so, and wa all at 0. A newly deployed application starts a new thread for every request. Which is the most likely cause?

Show the answer

Correct answerA. Too many runnable threads compete for too few CPUs, forcing constant scheduler context switches.

A very high cs rate with a long run queue and high system time means too many runnable threads share too few CPUs. Swapping and disk stalls are ruled out because si, so, and wa are all zero.