networking - ksoftirqd consumes >80% CPU on embedded platform -
We are designing SOHO router based on MOP processor, wired with a 24-port switch. CPU runs NAT (configured with iptables), iptables rules, DHCP etc. There is no H / W acceleration for these tasks. When NAT is tested in full-trap mode (i.e. a LAN port in Van port and the other), we see the recession of the critical system, especially the console responds very slowly, and packet loss it happens.
The 'top' indicates that KSouterCard consumes over 80% of CPUs.
What could be the reason for such behavior? Does the Linux NAT run in the user?
casualcard
s kernel threads driving .. Soft IRQs, such as TIMER_SOFTIRQ
, SCSI_SOFTIRQ
, TASKLET_SOFTIRQ
, and is relevant to your case, NET_TX_SOFTIRQ
and < Code> NET_RX_SOFTIRQ . These have been implemented in the bottom parts of the kernel, because defragment work with top horizontal - actual interrupt handlers in device drivers where latency is important.
The actual interrupt handler, or hardware IRQ, is concerned about getting data / data from a device as soon as possible for a network card. It does not know anything about NAT and other TCP / IP processing is. It knows about dealing with its bus (called PCI), little about its card characteristics (ring buffers, control / configured registers), DMA, and Ethernet.
Receives hands / receipts through packets (/ skbuf
being exact).
If you have not seen yet, if you can tune the hardware / drivers to the checksum / segmentation offloading, then see that I have no suggestion on the NAT front, I do not use it .
Hope this helps a little.
Edit:
As mentioned in the comments, check assistant driver for interrogation and support for interlocking NIC hardware.
Comments
Post a Comment