* RE: Context switch Tick
@ 2004-06-02 20:15 Garboua Nahil Y Contr WRALC/MASFE
2004-06-02 20:52 ` Richard B. Johnson
0 siblings, 1 reply; 3+ messages in thread
From: Garboua Nahil Y Contr WRALC/MASFE @ 2004-06-02 20:15 UTC (permalink / raw)
To: Mathieu Segaud, linux-kernel
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@minas-morgul.org]
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@robins.af.mil> 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@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: Context switch Tick
2004-06-02 20:15 Context switch Tick Garboua Nahil Y Contr WRALC/MASFE
@ 2004-06-02 20:52 ` Richard B. Johnson
0 siblings, 0 replies; 3+ messages in thread
From: Richard B. Johnson @ 2004-06-02 20:52 UTC (permalink / raw)
To: Garboua Nahil Y Contr WRALC/MASFE; +Cc: Mathieu Segaud, linux-kernel
[-- Attachment #1: Type: TEXT/PLAIN, Size: 831 bytes --]
On Wed, 2 Jun 2004, Garboua Nahil Y Contr WRALC/MASFE wrote:
> 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.
Can't you just measure it?
Script started on Wed Jun 2 16:48:51 2004
# ./tester
Testing CPU Speed (once at start of program)
CPU speed = 2803766848 Hz
Cycles to make the two function calls = 88
It took 55625156 cpu cycles or 19839.437091 microseconds.
# exit
Script done on Wed Jun 2 16:48:57 2004
That was for a usleep(1). Source attached.
Cheers,
Dick Johnson
Penguin : Linux version 2.4.26 on an i686 machine (5570.56 BogoMips).
Note 96.31% of all statistics are fiction.
[-- Attachment #2: Type: APPLICATION/octet-stream, Size: 973 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Context switch Tick
@ 2004-06-02 17:07 Garboua Nahil Y Contr WRALC/MASFE
0 siblings, 0 replies; 3+ messages in thread
From: Garboua Nahil Y Contr WRALC/MASFE @ 2004-06-02 17:07 UTC (permalink / raw)
To: linux-kernel
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?
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-06-02 20:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-02 20:15 Context switch Tick Garboua Nahil Y Contr WRALC/MASFE
2004-06-02 20:52 ` Richard B. Johnson
-- strict thread matches above, loose matches on Subject: below --
2004-06-02 17:07 Garboua Nahil Y Contr WRALC/MASFE
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®