Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am the administrator of a Linux router (Slackware 11.0) which also does traffic shaping. The hardware is a Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz
When the traffic load is around 200Mbps (pps ~ 30000) and approx 2000 users, top looks like this:
I think this is kinda strange. Why is one CPU (core) almost idle while the other three is pretty busy? Is it possible to do load balancing better?
The shaper is htb. Kernel is 2.6.19.2. iproute2-ss060323
I could probably do better if I upgrade to 12.1 and the latest tools, but upgrading this router is not something I like to do. Any hints?
By the way: I have a spare router and I will upgrade the software and OS soon. Do I have to take some actions in order to load balance better after upgrading? The short uptime is due to a hardware upgrade yesterday. Before shutdown the uptime was 374 days. I replaced a Intel(R) Core(TM)2 CPU 6700 @ 2.66GHz with the new quad core. Oh, and after the hardware upgrade I got an angry message from the BIOS: "Could not load CPU uCode". Guess I have to upgrade the BISO as well.
Last edited by robel; 11-09-2008 at 01:00 PM.
Reason: added pps
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660
Rep:
Do you perhaps have only 3 network interfaces in the machine? All the CPU time is spent on interrupts, which would be the NICs alerting the kernel that there's network traffic to handle. If you only have three NICs, perhaps each one is vectored to a specific CPU (just a guess)?
Do you perhaps have only 3 network interfaces in the machine?
In fact, yes. But... Only two is in use. eth0 and eth2 is in use, eth1 is not in use (no link, no cable connected).
But I think you're one the track. It's all about IRQ-balancing between the four cores. Think I read something about that some days ago. I will upgrade to Slackware 12.1 soon, and (by then) use kernel 2.6.28 which is in rc4 right now.
Processor affinity could be keeping the work on the same cpus.
Yes, that's true. Now, the router has a quad core single CPU and the load is spread among three cores. I would assume the four cores are affined...? Or is "Cpu1" different in some strange way? The load (mainly the shaping process) is on CPU 0,2 and 3. I find this weird, but I am not a CPU expert.
Yes, that's true. Now, the router has a quad core single CPU and the load is spread among three cores. I would assume the four cores are affined...? Or is "Cpu1" different in some strange way? The load (mainly the shaping process) is on CPU 0,2 and 3. I find this weird, but I am not a CPU expert.
Two years since this question. Somehow I managed to solve the problem, but... Now I have a new Slackware 13.1 and the same problem! I can't remember how I solved it, but obviously I did. Hmm... :-(
See if you can offload checksums to the nic's or get enterprise level nic's.
Seems like your drivers are not fully smp or maybe a bios setting like wrong smp version or wrong something with the kernel that thinks you only have three cores.
See if you can offload checksums to the nic's or get enterprise level nic's.
Seems like your drivers are not fully smp or maybe a bios setting like wrong smp version or wrong something with the kernel that thinks you only have three cores.
I have three Intel NIC's:
82572EI Gigabit Ethernet Controller (Copper) (rev 06)
82540EM Gigabit Ethernet Controller (rev 02)
82541PI Gigabit Ethernet Controller (rev 05)
This router is a traffic shaper on eth2 (82572EI PCI Express), using HTB to shape outbond traffic based on soure IP.
I agree with syg00 that this is an irq-issue. I'm not running irqbalance on the old router (which balances si's perfect).
Two years ago I solved the problem, and now I can't remember how I did it... It was a pretty simple and obvious solution.
eth2 is on irq 45 but ifconfig claims it on irq 18. I'm not sure if this is a problem, probably not.
The driver (e1000e) is not a module in the new router. Could that be the problem?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.