Skip to main content
kanand
Staff
Staff
Dec 12, 2024 3:06 PM UTC

Technical Tip: Understanding and analyzing high SoftIRQ

  • Jun 21, 2026 7:44 PM UTC
  • 0 replies
  • 8014 views
  • Translate All

Description

 

This article describes how to understand and analyze high SoftIRQ counts.

 

Scope

 

FortiGate.

 

Solution

 

SoftIRQs (software interrupts) play a critical role in handling system events efficiently. This article delves into the potential causes of high SoftIRQ utilization, focusing on excessive traffic and a high number of sessions as primary contributors.

The CPU can mainly be used in 3 distinct spaces:

  • User space: Time spent running application daemons and user-level programs.

  • System space: Time spent executing kernel instructions.

  • Interrupts (IRQ/SoftIRQs): Time spent handling hardware and software interrupts.

 
Monitoring CPU usage can provide insights into which space is contributing the most to system load. Recommended commands to start the investigation include:

get sys performance status
diagnose sys mpstat <refresh seconds>

 

These commands display the percentage of CPU usage for each category on a per-core basis, aiding in identifying the primary type of usage. Once the main type of usage has been identified, the focus can be moved to the specific case.

 

Interrupts are special functions triggered by specific events, instructing the CPU to pause its current task and handle the interrupt. Interrupts can be categorized as:

  1. Hardware interrupts (IRQ): Handles incoming MSI-X (Message Signaled Interrupts). These are lightweight and primarily schedule SoftIRQ processes, consuming minimal CPU time.

  2. Software interrupts (SoftIRQs): Process incoming packets using polling. They process as many packets as possible in each execution, but are limited in the number of packets they can handle. Any remaining packets will re-trigger the SoftIRQ for further processing.


In network devices, the main source of interrupts is the network packets received on interfaces.

Causes of high IRQ/SoftIRQ.


High interrupt utilization may result from several factors:

  1. L2 issues: Examples include broadcast storms or Layer 2 loops.

  2. Non-offloaded sessions: Sessions not handled by hardware acceleration (for example, NPU sessions).

  3. High session setup rates: Rapid establishment of new sessions.

  4. Excessive traffic: A high volume of packets requiring processing.


To view hardware interrupts, run the following command:

diagnose hardware sysinfo interrupts

 

Or run the following command:

fnsysctl cat /proc/interrupts


For example:

fnsysctl cat /proc/interrupts
CPU0 CPU1 CPU2 CPU3 CPU4 CPU5 CPU6 CPU7
...
142: 3506701 0 0 0 0 0 0 0 PCI-MSI-edge np6_0-tx-rx0
143: 1 742138 0 0 0 0 0 0 PCI-MSI-edge np6_0-tx-rx1
144: 1 0 3850634 0 0 0 0 0 PCI-MSI-edge np6_0-tx-rx2
145: 1 0 0 3319842 0 0 0 0 PCI-MSI-edge np6_0-tx-rx3


Investigating SoftIRQ subsystems.


To determine which SoftIRQ subsystem is consuming high levels of CPU, analyze '/proc/softirqs':

fnsysctl cat /proc/softirqs

 

kb2.PNG

 

  • HI: High-priority tasks.

  • NET_TX: Packets generated locally.

  • TIMER: Periodic timer functions.

  • NET_RX: Incoming traffic (user packets).

  • SCHEDULER: Task scheduling functions.

 

Notes:

  • NET_RX is the number of executions per second, not the number of packets. The higher the number of executions, the more packets are processed.

  • NET_TX packets: displays the number related to the execution of transmitted packets.

 

For instance:
Run the command twice (for example, 10 seconds apart) to calculate the difference and derive per-second values.

Capturekb3.PNG


NET_RX DIFFERENCE FOR CPU0:
427470114 - 425157559 = 2312555
2312555 / 10 = 231255

 

This calculation indicates NET_RX executed 231,255 times per second, suggesting a high volume of incoming packets.

 

Another command can be used to retrieve packets-per-second information for each interface: 'diagnose netlink interface packet-rate':

 

Example: 

 

FortiGate# diagnose netlink interface packet-rate
Interface Interface-Status Link-Status Speed(Mbps) RX-rate(per second) TX-rate(per second)
wan1        UP              Running      1000        19                  1 
internal    UP              Down         N/A         0                   0 
wan2        UP              Running      1000        0                   0

 

The command 'fnsysctl ifconfig' can also be used to show the RX and TX statistics on the interface: 

 

Example:

 

FortiGate# fnsysctl ifconfig port1
    port1 Link encap:Ethernet HWaddr 00:09:0F:09:C8:00
    UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1
    RX packets:31431657 errors:0 dropped:0 overruns:0 frame:0
    TX packets:3804713 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000 
    RX bytes:8923382720 (8.3 GB) TX bytes:620472991 (591.7 MB)

 

To help identify high-volume traffic sources that may be contributing to elevated CPU utilization, consider enabling a DoS policy on the FortiGate with the action set to Monitor. This approach can help highlight traffic sources generating unusually high packet rates without actively blocking traffic. Review the Anomaly Logs under Security Events and look for source-to-destination traffic flows exhibiting excessive packet rates.

High volumes of packet processing can significantly increase SoftIRQ activity, which may result in elevated CPU usage. By isolating these high-rate traffic sources and destinations, it is possible to determine whether network traffic is a contributing factor to the increased system load.

Related articles:

    Risk and Resilience in the Age of AI. An OT Thought Leadership Summit for Houston's Critical Infrastructure Leaders. Date: Thursday, December 3, 2026. Time: 8:30 am - 1:30 pm (CT). Location: The Westin Houston, Memorial City | 945 Gessner Road, Houston, TX 77024