Centos 8 路由器 BGP 上的 IRQ/CPU 使用率高

Centos 8 路由器 BGP 上的 IRQ/CPU 使用率高
PRC | sys    0.34s | user   0.10s  |              | #proc    124 | #trun      2  | #tslpi    93 |              | #tslpu     0  | #zombie    0 | clones     0 |               | #exit      0 |
CPU | sys   1% | user      1%  | irq     110% | idle    288% | wait      0%  | steal     0% | guest     0% |               | ipc     1.00 | cycl 1.07GHz | curf 3.48GHz  | curscal  94% |
cpu | sys   0% | user      0%  | irq      73% | idle     27% | cpu003 w  0%  | steal     0% | guest     0% |               | ipc     0.98 | cycl 2.82GHz | curf 3.68GHz  | curscal  99% |
cpu | sys   0% | user      0%  | irq      36% | idle     64% | cpu002 w  0%  | steal     0% | guest     0% |               | ipc     1.10 | cycl 1.36GHz | curf 3.53GHz  | curscal  95% |
cpu | sys   0% | user      0%  | irq       0% | idle     99% | cpu000 w  0%  | steal     0% | guest     0% |               | ipc     0.38 | cycl   72MHz | curf 3.12GHz  | curscal  84% |
cpu | sys   0% | user      1%  | irq       0% | idle     99% | cpu001 w  0%  | steal     0% | guest     0% |               | ipc     0.68 | cycl   43MHz | curf 3.60GHz  | curscal  97% |
CPL | avg1    0.14 | avg5    0.12  |              | avg15   0.04 |               |              | csw    15027 | intr  392691  |              |              | numcpu     4  |              |
MEM | tot     7.6G | free    4.7G  | cache 624.4M | dirty   0.1M | buff  668.4M  | slab  275.8M | slrec  74.0M | shmem 408.6M  | shrss   0.0M | vmbal   0.0M | hptot   0.0M  | hpuse   0.0M |
SWP | tot     1.0G | free    1.0G  |              |              |               |              |              |               |              |              | vmcom   1.9G  | vmlim   4.8G |
DSK |          sda | busy      0%  | read       0 |              | write      4  | KiB/r      0 | KiB/w     18 | MBr/s    0.0  | MBw/s    0.0 |              | avq     8.25  | avio 1.00 ms |
NET | transport    | tcpi      62  | tcpo      62 | udpi       0 | udpo     852  | tcpao      0 | tcppo      0 | tcprs      0  | tcpie      0 | tcpor      0 | udpnp      0  | udpie      0 |
NET | network      | ipi   536534  | ipo   533389 |              | ipfrw 532034  | deliv     88 |              |               |              |              | icmpi     26  | icmpo      0 |
NET | eth2     38% | pcki  467782  | pcko  216468 | sp 1000 Mbps | si  382 Mbps  | so   46 Mbps | coll       0 | mlti       1  | erri       0 | erro       0 | drpi       0  | drpo   0 |
NET | eth0     38% | pcki  210942  | pcko  461794 | sp 1000 Mbps | si   45 Mbps  | so  381 Mbps | coll       0 | mlti       1  | erri       0 | erro       0 | drpi      60  | drpo   0 |
NET | eth2.11   5% | pcki   86676  | pcko   56677 | sp 1000 Mbps | si   52 Mbps  | so   16 Mbps | coll       0 | mlti       0  | erri       0 | erro       0 | drpi   0  | drpo   0 |
NET | eth2.14   3% | pcki   15221  | pcko   69215 | sp 1000 Mbps | si   34 Mbps  | so   21 Mbps | coll       0 | mlti       0  | erri       0 | erro       0 | drpi   0  | drpo       0 |
NET | eth0.99   0% | pcki       8  | pcko       5 | sp 1000 Mbps | si    0 Kbps  | so    2 Kbps | coll       0 | mlti       0  | erri       0 | erro       0 | drpi   0  | drpo   0 |
NET | eth2.75   0% | pcki       4  | pcko       3 | sp 1000 Mbps | si    0 Kbps  | so    0 Kbps | coll       0 | mlti       0  | erri       0 | erro       0 | drpi   0  | drpo   0 |

    PID      SYSCPU      USRCPU        VGROW       RGROW        RDDSK       WRDSK       RUID          EUID           ST      EXC        THR      S       CPUNR       CPU       CMD        1/2
     29       0.13s       0.00s           0K          0K           0K          0K       root          root           --        -          1      S           3        1%       ksoftirqd/3
    861       0.02s   0.05s           0K          0K           0K          0K   frr           frr            --        -          4  S           0        1%       zebra
  29127       0.06s   0.00s           0K          0K           0K          0K   rngd          rngd           --        -          5  S           1        1%       rngd
    611       0.03s   0.02s           0K        528K           0K          0K   root          root           --        -          1  R           0        1%       systemd-journa
  29023       0.03s   0.02s           0K          0K           0K          0K   root          root           --        -          3  S           0        1%       rsyslogd
    875       0.02s   0.01s           0K          0K    

Intel(R) Xeon(R) CPU E3-1230 V2 @ 3.30GHz
# cat /proc/interrupts |grep eth
 26:   12138298  156087348  598925445          0   PCI-MSI 409600-edge      eth0
 28:     159096      37848     100076          9   PCI-MSI 524288-edge      eth1
 29:       2025    4617155          0 3780186852   PCI-MSI 526336-edge      eth2
 30:     197097          0      99931          0   PCI-MSI 1048576-edge      eth3-rx-0
 31:          0          0          0          0   PCI-MSI 1048577-edge      eth3-tx-0
 32:          1          0          0          0   PCI-MSI 1048578-edge      eth3
[root@gateway ~]# 

[root@gateway ~]# lspci |grep -i eth
00:19.0 Ethernet controller: Intel Corporation 82579LM Gigabit Network Connection (Lewisville) (rev 05)
01:00.0 Ethernet controller: Intel Corporation 82571EB/82571GB Gigabit Ethernet Controller D0/D1 (copper applications) (rev 06)
01:00.1 Ethernet controller: Intel Corporation 82571EB/82571GB Gigabit Ethernet Controller D0/D1 (copper applications) (rev 06)
02:00.0 Ethernet controller: Intel Corporation 82574L Gigabit Network Connection

高使用率 IRQ 29 是否与高使用率 CPU nr 3 相同或两种不同的使用情况?

top - 10:15:00 up 7 days,  1:05,  2 users,  load average: 0,07, 0,08, 0,03
Tasks: 125 total,   3 running, 122 sleeping,   0 stopped,   0 zombie
%Cpu0  :  0,3 us,  0,3 sy,  0,0 ni, 99,0 id,  0,0 wa,  0,3 hi,  0,0 si,  0,0 st
%Cpu1  :  0,0 us,  0,0 sy,  0,0 ni,100,0 id,  0,0 wa,  0,0 hi,  0,0 si,  0,0 st
%Cpu2  :  0,0 us,  0,0 sy,  0,0 ni, 63,7 id,  0,0 wa,  1,3 hi, 35,0 si,  0,0 st
%Cpu3  :  0,0 us,  0,0 sy,  0,0 ni, 23,8 id,  0,0 wa,  2,0 hi, 74,2 si,  0,0 st
MiB Mem :   7782,4 total,   4857,1 free,   1573,9 used,   1351,4 buff/cache
MiB Swap:   1024,0 total,   1024,0 free,      0,0 used.   5559,8 avail Mem 

    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND                     
     29 root      20   0       0      0      0 S   2,3   0,0  73:47.45 ksoftirqd/3                 
  29023 root      20   0  504312  18072  14204 S   0,7   0,2   3:02.43 rsyslogd                    
  29127 rngd      20   0  381428   6944   6108 R   0,7   0,1   8:35.26 rngd                        
     10 root      20   0       0      0      0 I   0,3   0,0   9:37.18 rcu_sched                   
    611 root      20   0  168080  53000  51556 R   0,3   0,7  35:13.54 systemd-jour

也许有人知道如何减少 IRQ 使用率?为什么在同样的吞吐量下,eth2 的 IRQ 使用率比 eth0 高得多?eth0 有 QoS,但 eth2 没有。不明白。

[root@gateway ~]# ethtool -k eth0
Features for eth0:
rx-checksumming: on
tx-checksumming: on
    tx-checksum-ipv4: off [fixed]
    tx-checksum-ip-generic: on
    tx-checksum-ipv6: off [fixed]
    tx-checksum-fcoe-crc: off [fixed]
    tx-checksum-sctp: off [fixed]
scatter-gather: on
    tx-scatter-gather: on
    tx-scatter-gather-fraglist: off [fixed]
tcp-segmentation-offload: off
    tx-tcp-segmentation: off
    tx-tcp-ecn-segmentation: off [fixed]
    tx-tcp-mangleid-segmentation: off
    tx-tcp6-segmentation: off
generic-segmentation-offload: off
generic-receive-offload: off
large-receive-offload: off [fixed]
rx-vlan-offload: on
tx-vlan-offload: on
ntuple-filters: off [fixed]
receive-hashing: on
highdma: on [fixed]
rx-vlan-filter: off [fixed]
vlan-challenged: off [fixed]
tx-lockless: off [fixed]
netns-local: off [fixed]
tx-gso-robust: off [fixed]
tx-fcoe-segmentation: off [fixed]
tx-gre-segmentation: off [fixed]
tx-gre-csum-segmentation: off [fixed]
tx-ipxip4-segmentation: off [fixed]
tx-ipxip6-segmentation: off [fixed]
tx-udp_tnl-segmentation: off [fixed]
tx-udp_tnl-csum-segmentation: off [fixed]
tx-gso-partial: off [fixed]
tx-sctp-segmentation: off [fixed]
tx-esp-segmentation: off [fixed]
tx-udp-segmentation: off [fixed]
tls-hw-rx-offload: off [fixed]
fcoe-mtu: off [fixed]
tx-nocache-copy: off
loopback: off [fixed]
rx-fcs: off
rx-all: off
tx-vlan-stag-hw-insert: off [fixed]
rx-vlan-stag-hw-parse: off [fixed]
rx-vlan-stag-filter: off [fixed]
l2-fwd-offload: off [fixed]
hw-tc-offload: off [fixed]
esp-hw-offload: off [fixed]
esp-tx-csum-hw-offload: off [fixed]
rx-udp_tunnel-port-offload: off [fixed]
tls-hw-tx-offload: off [fixed]
rx-gro-hw: off [fixed]
tls-hw-record: off [fixed]
[root@gateway ~]# ethtool -k eth2
Features for eth2:
rx-checksumming: on
tx-checksumming: on
    tx-checksum-ipv4: off [fixed]
    tx-checksum-ip-generic: on
    tx-checksum-ipv6: off [fixed]
    tx-checksum-fcoe-crc: off [fixed]
    tx-checksum-sctp: off [fixed]
scatter-gather: on
    tx-scatter-gather: on
    tx-scatter-gather-fraglist: off [fixed]
tcp-segmentation-offload: on
    tx-tcp-segmentation: on
    tx-tcp-ecn-segmentation: off [fixed]
    tx-tcp-mangleid-segmentation: off
    tx-tcp6-segmentation: on
generic-segmentation-offload: on
generic-receive-offload: on
large-receive-offload: off [fixed]
rx-vlan-offload: on
tx-vlan-offload: on
ntuple-filters: off [fixed]
receive-hashing: on
highdma: on [fixed]
rx-vlan-filter: on [fixed]
vlan-challenged: off [fixed]
tx-lockless: off [fixed]
netns-local: off [fixed]
tx-gso-robust: off [fixed]
tx-fcoe-segmentation: off [fixed]
tx-gre-segmentation: off [fixed]
tx-gre-csum-segmentation: off [fixed]
tx-ipxip4-segmentation: off [fixed]
tx-ipxip6-segmentation: off [fixed]
tx-udp_tnl-segmentation: off [fixed]
tx-udp_tnl-csum-segmentation: off [fixed]
tx-gso-partial: off [fixed]
tx-sctp-segmentation: off [fixed]
tx-esp-segmentation: off [fixed]
tx-udp-segmentation: off [fixed]
tls-hw-rx-offload: off [fixed]
fcoe-mtu: off [fixed]
tx-nocache-copy: off
loopback: off [fixed]
rx-fcs: off
rx-all: off
tx-vlan-stag-hw-insert: off [fixed]
rx-vlan-stag-hw-parse: off [fixed]
rx-vlan-stag-filter: off [fixed]
l2-fwd-offload: off [fixed]
hw-tc-offload: off [fixed]
esp-hw-offload: off [fixed]
esp-tx-csum-hw-offload: off [fixed]
rx-udp_tunnel-port-offload: off [fixed]
tls-hw-tx-offload: off [fixed]
rx-gro-hw: off [fixed]
tls-hw-record: off [fixed]

相关内容