Balancing IRQs

Home » CentOS » Balancing IRQs
CentOS 5 Comments

Hi All

I am using the following Linux version for my application:

****************************************
[root@localhost ~]# uname -a Linux localhost.localdom 2.6.18-164.el5 #1 SMP Thu Sep 3 03:28:30 EDT
2009 x86_64 x86_64 x86_64 GNU/Linux
****************************************

****************************************
[root@localhost ~]# cat /etc/*release CentOS release 5.4 (Final)
****************************************

When my application is running on the server i can see only one core being used heavily while the other cores are not being used much. My application has a major workload is collecting data from the eth0
interface and then doing a lot of processing with the data in the database. So i can say that the Disk I/O and Network I/O are the major contributors towards the workload.

from the /proc/interrupts file i can see the following:

****************************************************
[root@localhost ~]# cat /proc/interrupts
CPU0 CPU1 CPU2 CPU3
0: 16084980 0 0 0 IO-APIC-edge timer
1: 141 0 0 0 IO-APIC-edge i8042
6: 5 0 0 0 IO-APIC-edge floppy
7: 0 0 0 0 IO-APIC-edge parport0
8: 0 0 0 0 IO-APIC-edge rtc
9: 0 0 0 0 IO-APIC-level acpi
12: 251 0 0 0 IO-APIC-edge i8042
51: 2410224 0 0 0 IO-APIC-level ioc0
59: 11358257 0 0 0 IO-APIC-level eth0
NMI: 0 0 0 0
LOC: 16086147 16090336 16090320 16089691
ERR: 0
MIS: 0
****************************************************

From the above output i can see that all the interrupts are hitting the cpu0 and thats why it is used more than any other core in the system.

Can someone please help me in distributing the interrupts across all the cores so that all are used which will eventually result in a better performance of my system.

Appreciate your response in this regard.

Thanks Jatin

5 thoughts on - Balancing IRQs

  • to use multiple cores, you need multiple processes or threads in your application.

    question: is this processing happening as fast as the network and disk can supply data? an app processing data from a single network connection and using a single database connection is not going to achieve much concurrency.

    btw, CentOS 5.4 is /way/ old, you’re missing 5 years of security and bug fixes. 5.10 was released last october. a simple `yum update` will bring all repository packages up to the current fix level.

  • W dniu 2014-07-29 08:16, Jatin Davey pisze:
    Hi.

    Just use service irq balance: irqbalance from base repo of CentOS 5

    IP

  • Thanks John,

    I agree to your point that from the application end also we need fork multiple threads to make use of the multiple cores. Will also look if we can update the CentOS. Something may not be possible right away as lot of our production servers are already running with 5.4 but we will have to chalk out a plan at some stage to upgrade it.

    Thanks for your response.

    Thanks Jatin

  • Thanks Reindl,

    I will try out irqbalance and see if it helps. Appreciate your response in this regard.

    Thanks Jatin