General
cancel
Showing results for 
Search instead for 
Did you mean: 

vmstat and acceptable value for cs (context switches)

vmstat and acceptable value for cs (context switches)

Hello,

I wonder what is the range for acceptable values of context switches for up-to date Intel x86 processors (let's say, a Xeon® X5460 Quad Core 3.16 Ghz for example).

I can't find any recent information about this.

The fresher information I found is an article of 2002 that says (in substance):
A lot of context switching = greater than 20 000 per second.

If I apply Moore's Law, that would make 160 000
for a CPU in 2008.

Does anyone has informations on this ?

Let me know, thanks.

Louis Coilliot
Waterloo morne plaine
3 REPLIES
Ivan Ferreira
Honored Contributor

Re: vmstat and acceptable value for cs (context switches)

The true is that, I never used CS as a performance parameter. I don't think that there is a "suggested" value, it depends of the system, drivers and applications.

Focus on other performance counters.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?

Re: vmstat and acceptable value for cs (context switches)

Hmmm, this sounds like a kind of "tell me your need, i'll show you how to do without" answer.

I indeed also use other metrics.

But the values of the run queue AND cswitch/s can tell me if it is better to add more processors or to put a more powerfull processor.

Thanks, anyway.

Louis Coilliot
Waterloo morne plaine
Ivan Ferreira
Honored Contributor

Re: vmstat and acceptable value for cs (context switches)

I agree tha runq is a metric, related with idle CPU and load average. But still I don't know how CS can give you good/bad values.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?