How long does context switch on Linux?

I am wondering how many loops it takes to change contexts on Linux. I specifically use the E5405 Xeon (x64), but I would like to see how it compares with other platforms.

+3
source share
3 answers

There is a free LMBench app written by Larry McVoy and his friends. It provides many OS and HW tests. One of the tests is called lat_ctx, and it measures contex timer delays. Google for lmbench and test yourself on your own HW. This is the only way to get a number that matters to you.

Gilad

+7
source

vmstat , -, . , , , .

, - , . , 100: 1 - ? . 1000: 1

3000 , 0,3 . 100: 1, , 0,003 .

, , , .., :)

+3

, () UDP- 200 . .

This suggests that the context can be switched by no more than 2.5 microseconds, and the actual context switch probably takes a little less.

-1
source

Source: https://habr.com/ru/post/1702721/


All Articles