• TechOps

    Need clarity?
    Chat with our experts now

    • Web Hosting SupportWeb Hosting Support
    • Helpdesk Support

      Skilled and professional 24/7 helpdesk support

    • Product Support

      Boost your product support with our expertise

    • Managed ServicesManaged Services
    • Server Management

      Don't let server issues slow you down. Let us manage them for you

    • Server Monitoring

      Safeguard your server health with our comprehensive monitoring solutions

    • Staff AugmentationStaff Augmentation
    • Hire an Admin

      Transform your business operations with our expert administrative support

    • Hire a Team

      Augment your workforce with highly skilled professional from our diverse talent pool

  • CloudOps

    Confused?
    Discuss with our sales team now.

    • Author ProfileAWS
      Well Architected Review
    • Author ProfileFinOps As a Service

      FinOps As a Service

    • Migrate

      Upgrade the journey: Migrate & Modernize seamlessly

    • Modernize

      Effortless CloudOps mastery for seamless cloud management

    • Optimize

      Efficient CloudOps: Boosting performance through optimization

    • Manage

      Simplify compliance complexities with our dedicated service

  • DevOps

    How Supportsages
    is creating an
    impact?

    View Casestudies
    • Author Profile24/7 DevOps As a Service

      Round-the-clock DevOps for uninterrupted efficiency

    • Author ProfileCI/CD Pipeline

      Automated CI/CD pipeline for seamless deployments

    • Author ProfileInfrastructure As a Code

      Crafting infrastructure with ingenious code

    • Author ProfileDevSecOps

      Integrated security in continuous DevOps practices

    • Author ProfileHire DevOps Engineers

      Level up your team with DevOps visionaries

    • Author ProfileConsulting Services

      Navigate success with expert DevOps consulting

  • SecOps

    Expert SecOps Services
    for any Scale

    • Author ProfileVAPT

      Vulnerability Assessment and Penetration Testing

    • Author ProfileSource Code Review

      Ensuring source code security and safe practices to reduce risks

    • Author ProfileSecurity Consultation

      On demand services for improving server security

    • Author ProfileSystem Hardening

      Reduced vulnerability and proactive protection

    • Author ProfileManaged SOC

      Monitors and maintains system security. Quick response on incidents

    • Author ProfileCompliance as a Service

      Regulatory compliance, reduced risk

  • Insights

    Explore our latest
    insights and resources

    Blog

    Explore our latest articles and insights

    Case Studies

    Read about our client success stories

  • Contact Us

  • About
  • Certifications
  • Life at Supportsages
  • Events
  • Contact
  • Careers
  • Blog

  • Dedicated Support Team
  • Quasi-dedicated Support Team
  • Hire a DevOps Engineer
  • Hire a Billing Support Staff
  • Per-ticket Support Plan
  • Managed Services

  • Microsoft Azure Expert
  • AWS Cloud Expert
  • Hire a developer
SS

SupportSages

Bites of wisdom @ work


Copyright © 2008 - 2026 SupportSages Pvt Ltd. All Rights Reserved.
Privacy PolicyLegal TermsData ProtectionCookie Policy

SysAdmin Series – What does ksoftirqd do ?

Aaden Dev

  • 4 min read
SysAdmin Series – What does ksoftirqd do ?

Generating audio, please wait...

Operating System manages and controls I/O operations and I/O devices. Let’s have a quick overview of different ways of interacting with I/O devices, before we go through what a ksoftirqd does.

Interrupts – The CPU issues commands to the I/O module then proceeds with its normal work until interrupted by I/O device on completion of its work.

DMA – Direct Memory Access (DMA) means CPU grants I/O module, the authority to read from or write to memory without involvement.

Polling – OS simply checks from time to time if a device has completed a request.

There is DMA + Interrupts as well as DMA + polling as well.

Now let’s consider the interrupts way of interacting with the I/O. Interrupts from the hardware are known as “top-half” interrupts. Interrupts are best explained with network traffic.

When a NIC receives incoming data, it copies the data into kernel buffers using DMA. The NIC notifies the kernel of this data by raising a hard interrupt. These interrupts are processed by interrupt handlers which do minimal work, as they have already interrupted another task and cannot be interrupted themselves.

Hard interrupts can be expensive in terms of CPU usage, especially when holding kernel locks. The hard interrupt handler then leaves the majority of packet reception to a software interrupt, or SoftIRQ, a process which can be scheduled more fairly.

Hard interrupts can be seen in /proc/interrupts while soft interrupts can be seen at /proc/softirqs

The softirq system in the Linux kernel is a mechanism for executing code outside of the context of an interrupt handler implemented in a driver. This system is important because hardware interrupts may be disabled during all or part of the execution of an interrupt handler. When the interrupt handlers are processing the interrupts, they cannot be interrupted themselves. That is why we have the interrupt handlers doing the minimal work, of interruption, while the responsibility of actual receiving of network traffic is managed by software interrupts.

In some situations, IRQs come very very fast one after the other and the operating system cannot finish servicing one before another one arrives. One of the mechanisms of deferring the tasks is by implementing a queuing system, called ksoftirqd. ksoftirqd, is utilized when the machine is under heavy soft interrupt load.

If ksoftirqd is taking more than a certain percentage of CPU time, this indicates the machine is under heavy interrupt load and not eating CPU. If there is a bug in a driver or any other issue, you can see that one CPU is taking too much load while others are underutilized.

You can tweak the settings a bit, by defining which CPU picks up a certain
interrupt. You do this by changing the contents of /proc/irq/$interrupt_number/smp_affinity. You can get a list of interrupts and their meaning by doing:

cat /proc/interrupts

The number in smp_affinity is a bitmap of CPUs, represented in hex code. The rightmost bit is the least significant. For instance, if the system has 8 cores and you only wanted to use cores 0, 1 and 3, you should set the smp_affinity to

1a:

cpu_7 cpu_6 cpu_5 cpu_4 cpu_3 cpu_2 cpu_1 cpu_0
0  0  0  0  1  0  1  1 = 00001011 = 0B (in hex)

For eg: if you want to set up any of the CPU to be able to pick up interrupt 38 (eth0 in my 8-core system) with:

sudo echo ff > /proc/irq/38/smp_affinity

Get 24/7 expert server management

  • Sever management

Looking for AWS Experts?

We provide top-of-the-line custom AWS setup services tailored to your needs.

SysAdmin Series – What does ksoftirqd do ?

Engintron installation and configuration

Engintron installation and configuration
  • Linux
logo

When does DNS use TCP / UDP?

When does DNS use TCP / UDP?
  • DNS
  • Linux
logo

Posts by Aaden Dev

Aaden Dev