开发者

Is there a way to identify what is causing context switches on Linux?

开发者 https://www.devze.com 2023-02-18 04:50 出处:网络
I know vmstat can tell you context switches and MPSTAT will tell you intr/s.But, how do you iden开发者_如何学JAVAtify why the context switches are being generated.Which process/interrupt/thread is tri

I know vmstat can tell you context switches and MPSTAT will tell you intr/s. But, how do you iden开发者_如何学JAVAtify why the context switches are being generated. Which process/interrupt/thread is triggering the switch?

I have:

Red Hat Enterprise Linux Server release 5.2 (Tikanga)

Context switches when the system is not busy is at 10K but when busy this goes to 40K. MySQL on this server box is busy but I would like to understand what is driving the context switches.


pidstat -w from project sysstat.

Edit: however, if my reading is correct, detailed per-process data was added somewhere around 2.6.24, so a RHEL5 with stock 2.6.18 kernel may not support -w.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号