Saturday, February 7, 2015

How To Monitor Involuntary Context Switches In Linux

As you know, high involuntary context switches is a sign that your application has more threads to run than number of virtual processors available in your machine. Monitoring non voluntary context switches in Linux is easy. Just use "pidstat -w" command. You will see similar output as below:



Keep an eye on cswch/s and nvcswch/s columns. cswch/s indicates number voluntary context switches per second for a particular process, whereas nvcswch/s shows number of involuntary context switches per second for a process.

No comments:

Post a Comment