LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-31-2007, 03:27 PM   #1
EnigmaPsi
LQ Newbie
 
Registered: Mar 2007
Posts: 9

Rep: Reputation: 0
CentOS5 bridge: very high CPU usage


Hello all, I'm wondering if any of you encountered the following problem.

Recently installed a Centos5 machine on an old Athlon (2000+ or so), and placed it on a network that constantly has about 70 Mbps Internet Traffic (an ISP). The machine had less than 10% of processor active, all the time (monitored it with cacti for a few weeks). All the unwanted services were disabled (boot-time around 10-15 seconds).

Well, the ISP wanted a stronger machine, in order to place a traffic shaper with thousands of tc rules. And I installed Centos5 on a Intel dual-dore machine. The boot-time here is about 10 seconds, and also the unwanted services are disabled.

Now this is very interesting: on the second (much better) machine, the CPU usage is always above 10%, without any traffic shaping or anything, and this gets 20% at 70 Mbps. With 1500 tc rules, the CPU gets 60%. An unseen value, until now, on the servers i've setted up.

I had Centos4 installed on this machine (it was a ROUTER before), it had a traffic shaper with 1500+ rules and *never* had a CPU time bigger than 15%.

Is the bridging code eating these resources? Did any of you encountered this?

Code:
Specs:
Kernel: 2.6.18-8.1.4.el5
Bridging: bridge-utils-1.1-2

Bridge configured strictly redhat-stylish (ifcfg-br0, ifcfg-eth1, ifcfg-eth2)

Module                  Size  Used by
sch_sfq                 9665  1578
cls_u32                11845  4
sch_htb                19777  2
bridge                 53341  0
video                  19269  0
button                 10705  0
asus_acpi              19289  0
ac                      9157  0
sg                     35933  0
r8169                  31561  0
e100                   36809  0
pcspkr                  7105  0
ide_cd                 40033  0
mii                     9409  1 e100
cdrom                  36705  1 ide_cd
dm_snapshot            20581  0
dm_zero                 6209  0
dm_mirror              29713  0
dm_mod                 56537  14 dm_snapshot,dm_zero,dm_mirror
ahci                   21573  4
libata                 96857  1 ahci
sd_mod                 22977  6
scsi_mod              130637  4 sg,ahci,libata,sd_mod
raid1                  25153  2
ext3                  123081  5
jbd                    56553  1 ext3
 
Old 05-31-2007, 03:39 PM   #2
Runge_Kutta
Member
 
Registered: Jul 2006
Location: H-town, TX
Distribution: SuSE10.1, Ubuntu 9.10, RHEL-4-WS, Fedora Core 6, CentOS 5.x, Fedora 13
Posts: 35

Rep: Reputation: 16
type in "top" so we can see the processes that are taking up the cpu on both machines. Also, what network cards are in both machines?
 
Old 05-31-2007, 04:20 PM   #3
EnigmaPsi
LQ Newbie
 
Registered: Mar 2007
Posts: 9

Original Poster
Rep: Reputation: 0
Code:
Tasks:  83 total,   1 running,  82 sleeping,   0 stopped,   0 zombie
Cpu0  :  0.3%us,  0.0%sy,  0.0%ni, 79.7%id,  0.0%wa,  2.4%hi, 17.6%si,  0.0%st
Cpu1  :  0.0%us,  0.0%sy,  0.0%ni, 78.3%id,  0.0%wa,  2.3%hi, 19.4%si,  0.0%st
Mem:   1025728k total,   663824k used,   361904k free,   127568k buffers
Swap:  2097144k total,        0k used,  2097144k free,   395052k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  P SWAP COMMAND
    1 root      15   0  2036  644  552 S    0  0.1   0:00.55 1 1392 init
    2 root      RT   0     0    0    0 S    0  0.0   0:00.00 0    0 migration/0
    3 root      34  19     0    0    0 S    0  0.0   0:00.65 0    0 ksoftirqd/0
    4 root      RT   0     0    0    0 S    0  0.0   0:00.00 0    0 watchdog/0
    5 root      RT   0     0    0    0 S    0  0.0   0:00.00 1    0 migration/1
    6 root      35  19     0    0    0 S    0  0.0   0:00.73 1    0 ksoftirqd/1
    7 root      RT   0     0    0    0 S    0  0.0   0:00.00 1    0 watchdog/1 
    ...some more
Well, i certainly issue "top", and did not find anything. I mean, no process that eats CPU. All of them (top, ps aux) show 0.0 CPU activity, for all the services. CPU is occupied by kernel, that is certain.

The NICs are Realtek RTL-8169 GigaBit (rev 10), as can be seen from lsmod output, in my previous post.
 
Old 06-01-2007, 07:49 AM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,124

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
I presume Centos comes with sysstat.
I'd be trawling through sar to find out what all that interrupt usage is.
 
Old 06-02-2007, 09:35 AM   #5
EnigmaPsi
LQ Newbie
 
Registered: Mar 2007
Posts: 9

Original Poster
Rep: Reputation: 0
Sistem interrupts

Thanks, syg00, this is the first time I hear that "si" means "System Interrupts". I could not find this in Top manpage and thought it means System usage or something like it.

I was wondering...how can I use sar command to monitor system interrupts? I have the irqbalance service started, might it have something to do with this?
 
Old 06-02-2007, 08:44 PM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,124

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Yeah, you're right - sar probably won't help much. Time for some basic problem determination.
I'd be suspicious that the code (bridging whatever) isn't multiprocessor compliant. Try turning off the extra processor (in the BIOS preferably, or in the kernel itself), and see if the impact goes away.
Either way, you're going to have to find the culprit - start turning things off and see if you can isolate the effect. I was going to suggest vmstat to track it, but I'm now thinking that interrupt count is only the hardware interrupts. Maybe you'll be best running top in batchmode and pipe it to a file so you can correlate any change/effect.
 
Old 06-03-2007, 02:05 PM   #7
JohnE1
Member
 
Registered: Jun 2007
Location: Houston, TX
Distribution: Fedora, CentOS, Ubuntu
Posts: 66

Rep: Reputation: 16
htop may be more useful than top. htop shows processes in real time AND it is scrollable on the screen. That scrolling feature alone makes it much more useful than top and it's a very small utility. Google htop or go search sourceforge.net, I'm sure it's there.
 
Old 06-14-2007, 08:35 AM   #8
EnigmaPsi
LQ Newbie
 
Registered: Mar 2007
Posts: 9

Original Poster
Rep: Reputation: 0
Update: high interrupts rate

Well, I have investigated further, and found an interrupts rate, shown by /proc/interrupt, to be very high: over a bilion (!). Here is the output:

Code:
[root@bridge rc.d]# cat /proc/interrupts
           CPU0       CPU1
  0:   40854905   40831410    IO-APIC-edge  timer
  1:          8          0    IO-APIC-edge  i8042
  7:          0          0    IO-APIC-edge  parport0
  8:          3          0    IO-APIC-edge  rtc
  9:          0          0   IO-APIC-level  acpi
 14:         25          0    IO-APIC-edge  ide0
 66:      67524      86608         PCI-MSI  libata
 74:  709610016          0   IO-APIC-level  eth1
 82:    2097293    7988505   IO-APIC-level  eth0
185:  698714869          0   IO-APIC-level  eth2
NMI:          0          0
LOC:   79372411   80880545
ERR:          0
MIS:          0

Interesting that all these concentrate on the first CPU (bridge has eth1 and eth2 attached, eth0 is a standard configured interface).

Does anyone know if this is a bug in the bridge code, or is anything I cand do to change this interrupts level?

Thanks

Last edited by EnigmaPsi; 06-14-2007 at 08:36 AM.
 
  


Reply

Tags
bridge, centos5, cpu, high, usage



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
CentOS5 bridge: very high CPU usage EnigmaPsi Red Hat 1 06-01-2007 01:08 PM
High CPU usage ?! Why? skate Linux - Software 1 04-11-2007 05:55 AM
High Cpu usage untak Debian 21 01-23-2007 06:21 AM
cpu usage high corbintechboy VectorLinux 2 07-27-2005 08:11 AM
locking at high CPU usage charon Linux - Newbie 4 03-10-2004 02:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:23 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
Open Source Consulting | Domain Registration