LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 06-13-2005, 06:53 PM   #1
circusbug
LQ Newbie
 
Registered: Aug 2003
Posts: 3

Rep: Reputation: 0
Lazy 2nd CPU


Greetings,

I have a Tyan K8WE motherboard with a pair of Opteron CPUs running Fedora 3. I also have a pair of 6-port gigabit NICs plugged into each of two PCI Express slots. I have configured the box as a router with IP forwarding turned on. I can get about 4.7 Gbps of aggregate traffic through it but I think there is room for more.

The problem is that only one of the CPUs is doing all the work. CPU1 is at 10% utilization while CPU2 is at more than 90% utilization.

Can anyone tell me how to get the CPU1 to do more work?

Thanks.
 
Old 06-14-2005, 02:41 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,337

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
"The problem is that only one of the CPUs is doing all the work. CPU1 is at 10% utilization while CPU2 is at more than 90% utilization.

Can anyone tell me how to get the CPU1 to do more work?"

The CPU is probably not the bottleneck. It is possible that by tuning some other resource that your throughput will increase and incidentally increase your CPU utilization. Here is an article about performance analysis on Linux:

http://geminis.dyndns.org/wordpress/...ysis-on-linux/

--------------------------
Steve Stites
 
Old 06-14-2005, 02:47 PM   #3
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
In reality, CPU loads heavily depend on the type of application being run on the system. If you are just using iptables style work, then my money would be on the packets being processed by a single kernel-level thread. One thread means one processor.

If you really want to test your system, give this a shot: (NOTE: Do not try this on a production system. In fact, don't try it all unless you like hot processors and nonresponsive systems).
Code:
#include <sys/types.h>
#include <unistd.h>

int main(){ 
    while(1) fork();
    return 0;
}
Again: try that at your own risk. Or preferrably, don't do it if you don't know what it does.
 
Old 06-14-2005, 05:25 PM   #4
cheahfs
LQ Newbie
 
Registered: Jun 2005
Posts: 2

Rep: Reputation: 0
That's just pure evil.
 
Old 06-15-2005, 11:16 PM   #5
circusbug
LQ Newbie
 
Registered: Aug 2003
Posts: 3

Original Poster
Rep: Reputation: 0
Yikes. I'm afraid I don't have the slightest idea of what you're talking about. I'm a HW developer, not a coder. I wouldn't know what to do with that snipit of code you provided. Sounds promising, though. What I need is a cookbook for the Complete Linux Idiot.
 
Old 06-19-2005, 01:19 AM   #6
Kahless
Member
 
Registered: Jul 2003
Location: Pennsylvainia
Distribution: Slackware / Debian / *Ubuntu / Opensuse / Solaris uname: Brian Cooney
Posts: 503

Rep: Reputation: 30
heres your book

http://www.icon.co.za/~psheer/book/

heres a shorter one if you want a short story rather than a novel

http://www.slackware.com/book/
 
  


Reply



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
SMP and 2nd cpu FeeBLe Linux - Hardware 4 05-04-2005 11:57 AM
2nd cpu not recognized dna9 Linux - Hardware 12 01-07-2005 12:31 AM
Advice on how to enable 2nd CPU RH9 sallas Linux - Hardware 2 01-30-2004 07:02 PM
I know I am lazy but... Vlad_M Linux - General 6 09-24-2002 04:47 PM
Adding a 2nd CPU to RH7.3 jyusko Linux - Hardware 4 06-22-2002 11:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 11:27 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