Page 1 of 1

irqbalance & multi core dual CPUs with Centos 4.4 + kernel 2

Posted: 2007/01/05 21:50:21
by midair77
Hi, all. I compiled the kernel and booted up the machine, well, it stopped at irqbalance at booting up. I had to boot back to the default kernel and things were ok again.

I downloaded the latest irqbalance package from irqbalance.org then compiled and replaced /usr/sbin/irqblance with this one. Booted up my machine with the new kernel and things seemed to work.

The size of the stock irqbalance file is 15K whereas the new one is 94K.

Is there anyway I could check whether the new one is actually working? Maybe by looking at /proc/interrupts file and see that
the interrupts are spread across all 4 CPUs or cores.

What could be wrong with the stock when I used it with the new kernel? Could it be too old for the new kernel?

I really need to have irqbalance to work b/c my machines are used in scientific cluster.

Thank you for all the helps.

Re: irqbalance & multi core dual CPUs with Centos 4.4 + kernel 2.6.9 not work

Posted: 2007/01/06 00:41:23
by Lenard
[quote]
Hi, all. I compiled the kernel and booted up the machine, well, it stopped at irqbalance at booting up. I had to boot back to the default kernel and things were ok again.
[/quote]

I never have good luck building a kernel from the Red Hat source package myself, maybe you missed something.

[quote]
I downloaded the latest irqbalance package from irqbalance.org then compiled and replaced /usr/sbin/irqblance with this one. Booted up my machine with the new kernel and things seemed to work.

The size of the stock irqbalance file is 15K whereas the new one is 94K.
[/quote]

Strange when I compiled the latest irqbalnce from the fedora Development source rpm the /usr/sbin/irqblance file is only about 21K. The pre-built irqbalance-0.55-2 for Fedora Core 6 (and RHEL5 Beta which I'm running) is only about 24k;

$ ls -al /usr/sbin/irqbalance
-rwxr-xr-x 1 root root 24872 Dec 12 14:29 /usr/sbin/irqbalance

$ rpm -qa irqbalance
irqbalance-0.55-2.fc6


[quote]
Is there anyway I could check whether the new one is actually working? Maybe by looking at /proc/interrupts file and see that
the interrupts are spread across all 4 CPUs or cores.
[/quote]

See man service for the details; service irqbalance status

For example;
$ sudo service irqbalance status
irqbalance is stopped

which normal for my laptop

[quote]
What could be wrong with the stock when I used it with the new kernel? Could it be too old for the new kernel?
[/quote]

Explain what you mean by new kernel, a RH kernel source, a vanilla source or????

Re: irqbalance & multi core dual CPUs with Centos 4.4 + kernel 2.6.19 (not 2.6.9) not work

Posted: 2007/01/06 01:07:10
by midair77
I am sorry. I was not clear on saying "new kernel". I downloaded the vanilla kernel 2.6.19 (not 2.6.9, dang it, I missed a number there) and compiled. I did not intent to use the kernel from other sources. Sorry for all the confusion.

ls -lhat irqbalance*
-rwxr-xr-x 1 root root 94K Jan 5 13:33 irqbalance
-rwxr-xr-x 1 root root 15K Aug 15 01:15 irqbalance.orginal

I used this version; irqbalance-0.55.tar.gz and just simply did a make to compile this software package.

I know for sure that irqbalance is running, and I would like to make sure that it actually intercepts interrupts and spread the works among CPU cores.

ps auxw | grep irqbalance
root 3487 0.0 0.0 4184 472 ? Ss 16:35 0:00 irqbalance
root 6214 0.0 0.0 51164 736 pts/1 S+ 16:57 0:00 grep irqbalance

I read somewhere by examing /proc/interrupts we can see whether it works or not.
CPU0 CPU1 CPU2 CPU3
0: 99224 102709 98657 102756 IO-APIC-edge timer
1: 1 1 0 0 IO-APIC-edge i8042
6: 1 1 1 0 IO-APIC-edge floppy
8: 0 0 0 0 IO-APIC-edge rtc
9: 0 0 0 0 IO-APIC-fasteoi acpi
12: 2 1 1 0 IO-APIC-edge i8042
14: 3323 2356 3108 2345 IO-APIC-edge ide0
15: 4747 1389 4871 1315 IO-APIC-edge ide1
16: 0 0 0 0 IO-APIC-fasteoi uhci_hcd:usb5
17: 2591 18 2585 20 IO-APIC-fasteoi ehci_hcd:usb1, uhci_hcd:usb2
18: 0 0 0 0 IO-APIC-fasteoi uhci_hcd:usb4
19: 0 0 0 0 IO-APIC-fasteoi uhci_hcd:usb3
506: 371 143 145 182 PCI-MSI-edge eth1
507: 869 922 2588 1021 PCI-MSI-edge eth0
NMI: 122 42 56 43
LOC: 403292 403270 403253 403220
ERR: 0

Thanks very much for your responses.

Re: irqbalance & multi core dual CPUs with Centos 4.4 + kernel 2.6.19 (not 2.6.9) not work

Posted: 2007/01/06 13:16:12
by Lenard
Well thanks for the info, it helps.

Since your using a custom built kernel (2.6.19) I can better answer you now. First the irqbalance rpm package for CentOS is based on the older source which is 2 years old and only recently has irqbalance (Dec 2006) been updated. The old code does not work well with the newer vanilla kernel sources (2.6.18 or better);

http://lwn.net/Articles/213731/

While everything looks good and is working then as a suggestion only, do download load the irqbalance-0.55-2 source rpm package from Fedora development and build the binary rpm package.

wget http://download.fedora.redhat.com/pub/fedora/linux/core/development/source/SRPMS/irqbalance-0.55-2.fc7.src.rpm

rpm -ivh irqbalance-0.55-2.fc7.src.rpm
cd /usr/src/redhat/SPECS

You do need to edit the spec file and remove the imake requirement; BuildRequires: glib2-devel pkgconfig imake

Then build the binary rpm package; rpmbuild -bb --define 'dist .c4' irqbalance.spec

Finally install the binary package; rpm -Uvh irqbalance-0.55*.rpm
Review the output from the rpmbuild command it will tell you where the binary rpm package is.

You should also consider using the 2.6.20-rc3 vanilla kernel source also because of the ext3 filesystem corruption bug;
http://kerneltrap.org/node/7518