ErlCee++

Luke Gorrie luke@REDACTED
Tue Jun 8 15:35:33 CEST 2004


Luke Gorrie <lgorrie@REDACTED> writes:

>   Linux 2.6 does one thousand context-switches per second, spends
>   absolutely bugger-all CPU to do it, and AFAIK the scheduler is O(1).

Let me clarify what I meant:

In 2.6 the default time-slice for a process is 1ms. So if you have two
or more CPU-busy processes then you will have at least one thousand
context switches per second, and the overhead of this is very small -
i.e. Linux context switching is "pretty darn fast."

Specifically I did not mean to say that 1000 switches per second was a
maximum (that a switch takes a whole millisecond), nor to imply that
other Unices are slower (I've no idea.)

Happy now, Per? :-)

-Luke

P.S., actually 'vmstat' says my laptop is making about 2000 switches
per second while it's (from my point of view) idle.




More information about the erlang-questions mailing list