RE: Context switch Tick

From: Garboua Nahil Y Contr WRALC/MASFE
Date: Wed Jun 02 2004 - 15:24:28 EST


Okay, vmstat show me the cs according to current load, what is the Maximum
tick rate?
A process requests a 1 microseconds sleep, or even 500 nanoseconds, how long
does it actually sleep, that is why I need to know max tick rate for context
switch for a given CPU.

-----Original Message-----
From: Mathieu Segaud [mailto:matt@xxxxxxxxxxxxxxxx]
Sent: Wednesday, June 02, 2004 3:52 PM
To: Garboua Nahil Y Contr WRALC/MASFE
Subject: Re: Context switch Tick

Garboua Nahil Y Contr WRALC/MASFE <Nahil.Garboua@xxxxxxxxxxxxx> writes:

> How fast does the kernel switches contexts, and does it dependent on type
> and speed of cpu?
> Where/how can I find current system tick rate for the Linux kernel
> context switch?

The context switch tick rate depends on many things:
- any time an interrupt is triggered, there is a ctx switch,
- schedule() performs a context switch if it finds a suitable process,
- schedule() is called on every blocking io that a process calls for,

so the rate is quite changing ;)
if you want to know the current ctx switch rate, use vmstat

vmstat 1 will gives a line per second on system info:
process statistics, io stats, memory stats, and cpu stats

the one you want is denoted "cs"

--
Mathieu Segaud

> -
> To unsubscribe from this list: send the line "unsubscribe
> linux-kernel" in the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/