LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices



Reply
 
Search this Thread
Old 08-15-2012, 07:28 AM   #1
saiyen2002
Member
 
Registered: Dec 2006
Location: London, UK
Distribution: Centos, Fedora
Posts: 50

Rep: Reputation: 0
linux not using all cpu cores


I have Centos 5 with kernel 2.6.18-194.el5 #1 SMP.

It is a ProLiant DL140 G3 running 2 Quad Core processors.

My /proc/interrupt looks as follows
Code:
# cat /proc/interrupts
           CPU0       CPU1       CPU2       CPU3       CPU4       CPU5       CPU6       CPU7
  0:   76070374          0          0          0          0          0          0          0    IO-APIC-edge  timer
  1:          0          0          0          0          0          0          0          0    IO-APIC-edge  i8042
  8:          0          0          0          0          0          0          0          0    IO-APIC-edge  rtc
  9:          0          0          0          0          0          0          0          0   IO-APIC-level  acpi
 14:     682150          0          0          0          0          0          0          0    IO-APIC-edge  ide0
 74:        102          0          0          0          0          0          0          0   IO-APIC-level  ehci_hcd:usb1, uhci_hcd:usb2, uhci_hcd:usb3, uhci_hcd:usb4
 82:     111586          0          0          0          0          0          0          0   IO-APIC-level  ata_piix
169:  129400221          0          0          0          0          0          0          0   IO-APIC-level  eth0, wanpipe1, wanpipe2, wanpipe3, wanpipe4, wanpipe5, wanpipe6, wanpipe7, wanpipe8
NMI:      72262        339        315        360        319        312        364        353
LOC:   76059783   76059744   76059648   76059588   76059517   76059445   76059346   76054603
ERR:          0
MIS:          0
I am trying to understand why all of the cores are no being used. Is there a kernel conrfiuration that i need to pass?

Last edited by saiyen2002; 08-15-2012 at 07:29 AM. Reason: fixed some grammer
 
Old 08-15-2012, 07:45 AM   #2
johnsfine
Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,139

Rep: Reputation: 1127Reputation: 1127Reputation: 1127Reputation: 1127Reputation: 1127Reputation: 1127Reputation: 1127Reputation: 1127Reputation: 1127
I don't know why it acts that way. Maybe someone else will jump in with more info.

But why do you want it to not act that way?

1) Servicing interrupts may be a small enough fraction of any one core's total workload that it doesn't really matter which core does it.

2) If servicing interrupts is a significant load then you get better cache behavior and better total system throughput by having all that on one core rather than distributed.

At worst, you might need to take it into account when/if you restrict certain processes to specific cores. Core zero will have worse application level performance because of the extra cache misses it experiences on return from each interrupt. If processes are randomly assigned to cores, the fact that one core is slower will average out to less total impact than if the extra cache misses were increased by distributing them over more cores. If processes are non randomly distributed to cores then the fact that one core is slower than the others is just a factor to take into account.
 
Old 08-15-2012, 09:33 AM   #3
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
All the cores are being used, I count 8 cores. Interrupts are usually handled by core 0 (the first one). I don't see what the problem is.
 
Old 08-15-2012, 06:15 PM   #4
jefro
Guru
 
Registered: Mar 2008
Posts: 12,084

Rep: Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520
Would top command provide a clue also?
 
Old 08-16-2012, 05:05 PM   #5
saiyen2002
Member
 
Registered: Dec 2006
Location: London, UK
Distribution: Centos, Fedora
Posts: 50

Original Poster
Rep: Reputation: 0
OK. I guess i didn't know what i was talking about and asked the wrong questions.

What I wanted to say is why are all the core's not being used in interrupt 169?

As i understand it, we are able to configure smp_affinity to control which cores handle what devices. But in the newer linux, we have irqbalance. Does that mean we do not have to mess about with smp affinity ?
 
Old 08-16-2012, 05:24 PM   #6
Celyr
Member
 
Registered: Mar 2012
Location: Italy
Distribution: Slackware+Debian
Posts: 314

Rep: Reputation: 77
Indeed it's strange, i would suggest you to upgrade your kernel.
This is what I'm getting from a x64 3.2.27 SMP kernel

# cat /proc/interrupts
Code:
           CPU0       CPU1       CPU2       CPU3       
  0:        148         22         21         19   IO-APIC-edge      timer
  1:          0          0          1          1   IO-APIC-edge      i8042
  8:          7          9          6          6   IO-APIC-edge      rtc0
  9:          0          0          0          0   IO-APIC-fasteoi   acpi
 12:          2          1          1          0   IO-APIC-edge      i8042
 14:          1          0          0          0   IO-APIC-edge    
 15:          1          0          0          0   IO-APIC-edge    
 16:          0          0          0          0   IO-APIC-fasteoi   uhci_hcd:usb3
 18:          0          1          0          1   IO-APIC-fasteoi   ehci_hcd:usb1, uhci_hcd:usb8
 19:      21763      21735      21640      21696   IO-APIC-fasteoi   ata_piix, ata_piix, uhci_hcd:usb5, uhci_hcd:usb7
 21:          0          0          0          0   IO-APIC-fasteoi   uhci_hcd:usb4
 23:      40839      40847      40876      40896   IO-APIC-fasteoi   ehci_hcd:usb2, uhci_hcd:usb6
 40:          0          0          0          0   PCI-MSI-edge      PCIe PME
 41:          0          0          0          0   PCI-MSI-edge      PCIe PME
 42:          0          0          0          0   PCI-MSI-edge      PCIe PME
 43:      41213      40802      40609      40670   PCI-MSI-edge      eth0-rx-0
 44:     113763     113528     112960     113535   PCI-MSI-edge      eth0-tx-0
 45:          1          1          0          1   PCI-MSI-edge      eth0
 46:     249254     249574     250617     250284   PCI-MSI-edge      eth1-rx-0
 47:     164798     165147     164933     164555   PCI-MSI-edge      eth1-tx-0
 48:          1          1          1          0   PCI-MSI-edge      eth1
So I'm going to say that the default behavior is to split IRQ over all cores
 
1 members found this post helpful.
Old 08-17-2012, 10:35 AM   #7
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
Celyr is right, newer kernel do balance IRQs. I can see the same on 3.5.2, so if this is what you want, then upgrade the kernel.
 
  


Reply

Tags
proc


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
CPU cores usage mikes88 Solaris / OpenSolaris 7 03-20-2012 06:44 PM
Software and CPU Cores DIGITAL39 Linux - Software 8 10-10-2007 03:47 AM
Can Linux SMP Kernel Support 3 Cores CPU? btbx Linux - Kernel 1 07-26-2007 04:04 AM


All times are GMT -5. The time now is 09:48 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration