[MASOCH-L] Alto uso de software interrupts (%si + irqs/seq) ksoftirqd

Tiago A. Pecanha tiago at symetric.com.br
Wed Nov 21 17:21:59 BRST 2012


Boa tarde a todos,
Estou com uma situação aqui bem estranha. De um tempo para cá um servidor DELL (16GB RAM) com quagga + iptables que está funcionando como borda começou a apresentar uma alta utilização de cpu pelo  processo: ksoftirqd e isso gera aumento de latência e lentidão na rede.

Investigando, percebi que quando desativo as regras de prerouting (mangle) o problema não ocorre, ou se ocorre, é raro.

Segue detalhes do pert top:
  PerfTop:   53248 irqs/sec  kernel:99.1% [100000 cycles],  (all, 4 CPUs)
------------------------------------------------------------------------------

             samples    pcnt   kernel function
             _______   _____   _______________

            69219.00 - 35.2% : __nf_conntrack_find	[nf_conntrack]
            35383.00 - 18.0% : nf_conntrack_tuple_taken	[nf_conntrack]
            12884.00 -  6.6% : ipt_do_table	[ip_tables]
            11483.00 -  5.8% : __nf_conntrack_confirm	[nf_conntrack]
…

Com as regras de prerouting desativadas, a quantidade de irqs/sec cai para: 40.000 irqs/sec.

Outra percepção é que o top mostra o %si (software interrupts) sempre alto em torno de 40-50%, embora o load em si não esteja sofrendo alteração. :

top - 17:15:00 up 8 days, 47 min,  3 users,  load average: 0.56, 0.26, 0.11
Tasks: 118 total,   1 running, 117 sleeping,   0 stopped,   0 zombie
Cpu(s):  0.7%us,  2.0%sy,  0.0%ni, 54.4%id,  0.2%wa,  0.0%hi, 42.6%si,  0.0%st

Outras informações:
procinfo

user  :           00:21:44.36   0.0%  page in :           289857               
nice  :           00:00:02.66   0.0%  page out:          4169116               
system:           01:03:14.32   0.1%  page act:           219456               
IOwait:           00:50:29.26   0.1%  page dea:                0               
hw irq:           00:00:00.00   0.0%  page flt:         15238920               
sw irq:     1w 1d 15:18:33.45  26.9%  swap in :                0               
idle  :     3w 2d 09:03:08.63  72.8%  swap out:                0               
uptime:     1w 1d 00:39:18.50         context :        223357822               

irq   0:        122  timer               irq  36: 2492615915  eth0-0           
irq   8:          0  rtc0                irq  37: 1293592450  eth0-1           
irq   9:          0  acpi                irq  38: 1211442485  eth0-2           
irq  22:        122  ehci_hcd:usb1, eh   irq  39: 1211107379  eth0-3           
irq  24:          0  aerdrv              irq  40: 4272185523  eth0-4           
irq  26:     765601  ahci                irq  45: 1471491690  eth2-0           
irq  27: 2708947662  eth1-0              irq  46: 3254363222  eth2-1           
irq  28: 2811783190  eth1-1              irq  47: 3218222492  eth2-2           
irq  29: 2749726612  eth1-2              irq  48: 2499469024  eth2-3           
irq  30: 2728783322  eth1-3              irq  49: 2547978592  eth2-4           
irq  31: 1807011467  eth1-4                                                    

sda             9376r          532521w                                         

eth0        TX 12.10TiB      RX 20.57TiB      eth2.3835   TX 4.25TiB       RX 9.85TiB      
eth1        TX 31.73TiB      RX 17.48TiB      eth3        TX 0.00B         RX 0.00B        
eth2        TX 4.31TiB       RX 10.14TiB      lo          TX 5.64KiB       RX 5.64KiB  



Abaixo /proc/interrupts:
cat /proc/interrupts 
           CPU0       CPU1       CPU2       CPU3       
  0:        122          0          0          0   IO-APIC-edge      timer
  8:          0          0          0          0   IO-APIC-edge      rtc0
  9:          0          0          0          0   IO-APIC-fasteoi   acpi
 22:        122          0          0          0   IO-APIC-fasteoi   ehci_hcd:usb1, ehci_hcd:usb2
 24:          0          0          0          0   PCI-MSI-edge      aerdrv
 26:     254331     182388     154158     175678   PCI-MSI-edge      ahci
 27:  648023117  654101361  736825834  673629002   PCI-MSI-edge      eth1-0
 28: 2297148063 1592992343 1391061909 1834667438   PCI-MSI-edge      eth1-1
 29:  135131309 1673789797 1913159988 3331788364   PCI-MSI-edge      eth1-2
 30:   26520871 3171109584 2501724983 1333684607   PCI-MSI-edge      eth1-3
 31: 3613782390  735022421 1124516592  636788551   PCI-MSI-edge      eth1-4
 36:  423795660  630790190  716927972  724432073   PCI-MSI-edge      eth0-0
 37: 2281925322 1098175486 1131688307 1083751173   PCI-MSI-edge      eth0-1
 38: 1621489023 1303100298 1321043719 1267754133   PCI-MSI-edge      eth0-2
 39: 1390297023 1330440799 1458382152 1333839076   PCI-MSI-edge      eth0-3
 40:  766976998 1167113515 1139051088 1204103139   PCI-MSI-edge      eth0-4
 45:  269912535  399788533  398605253  406320919   PCI-MSI-edge      eth2-0
 46:  947330915  722427060  790429835  798751515   PCI-MSI-edge      eth2-1
 47: 1133799951  680459374  727996551  680593966   PCI-MSI-edge      eth2-2
 48:  423021869  714977841  687626207  677140493   PCI-MSI-edge      eth2-3
 49:  464079873  736585629  711691063  638959746   PCI-MSI-edge      eth2-4
NMI:  107596285  107592380  107599814  107591919   Non-maskable interrupts
LOC:   79873109   80162769   79456124   79175638   Local timer interrupts
SPU:          0          0          0          0   Spurious interrupts
PMI:  107596280  107592379  107599813  107591912   Performance monitoring interrupts
PND:  107569857  107566488  107574071  107566157   Performance pending work
RES:       4676      45175      36513      30800   Rescheduling interrupts
CAL:         49         91         72         89   Function call interrupts
TLB:       8998      12383      10700       5870   TLB shootdowns
TRM:          0          0          0          0   Thermal event interrupts
THR:          0          0          0          0   Threshold APIC interrupts
MCE:          0          0          0          0   Machine check exceptions
MCP:       2316       2316       2316       2316   Machine check polls
ERR:          0
MIS:          0


Estou precisando de algum auxílio no troubleshooting desse problema. Será que pode ter relação com o tráfego que passa pelo servidor? Estamos com um consumo médio de 500Mbps (tx+rx) no eth0, 200Mbps no eth2, e 250mbps no eth1.
    


More information about the masoch-l mailing list