最近查 cpu 占用问题,遇到系统负荷高得时候,发现软中断占用特别高;但是如果整体 cpu 占用比较低的时候,软中断占用就表现比较正常。
PS: 有没有大佬知道怎么查此类 CPU 占用问题呢,小弟不胜感激。
PS: 有没有大佬知道怎么查此类 CPU 占用问题呢,小弟不胜感激。
1
cubecube Mar 24, 2022
有没有一种可能,cpu 占用低的时候,软中断处理速率快,没堆积?
|
3
weiping1992 Mar 24, 2022 via Android
我没太明白你的问题。收取网络报文有两个阶段,一个是硬件网卡通知内核有数据到达;另一个过程是内核将内核空间的数据报文拷贝到应用程序的用户空间中。后者应该就是你说的软件中断吧
|
4
Srar Mar 25, 2022
猜测可能是硬件多次中断在短时间内会合并成一个中断来通知,这个是 intel 网卡关于中断合并的表述:
``` When an event occurs, the adapter generates an interrupt, which allows the driver to handle the packet. At greater link speeds, more interrupts are created, and CPU rates also increase. This results in poor system performance. When you use a higher ITR setting, the interrupt rate is lower, and the result is better system performance. ``` |
5
LwZiye OP @weiping1992 看起来是的
|