Skip to contentSkip to conversation

Bandwith limitation

LARTC Rinse Kloek 4 participants 6 messages Mar 10, 2003

lore
Share & tools
lore
#0 lore raw

We use a RedHat 7.3 machine as bridge on a P3 1.8 Ghz with 2 64 bits Gigabit interfaces. On the machine we have a lot of iptables rules like :

           all  --  213.134.225.0        0.0.0.0/0
           all  --  0.0.0.0/0            213.134.225.0
TOS    all  --  213.134.225.4        0.0.0.0/0          TOS set 0x08
           all  --  0.0.0.0/0            213.134.225.4

Currently in the peak hours we have about 40 Megabit traffic. Also in this peak hours we have a CPU load of about 70%. What is the main reason of this CPU load, is it the high traffic or the iptables rules on the machine. And if the iptables rules are the reaseon of the high CPU load, does TOS mangling use much CPU?

Kindly regards,

Rinse Kloek - Solcon Internetdiensten B.V.
www.solcon.net

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

#1 lore raw
Quoted 7 lines · Rinse Kloek

We use a RedHat 7.3 machine as bridge on a P3 1.8 Ghz with 2 64 bits Gigabit interfaces. On the machine we have a lot of iptables rules like :

           all  --  213.134.225.0        0.0.0.0/0
           all  --  0.0.0.0/0            213.134.225.0
TOS    all  --  213.134.225.4        0.0.0.0/0          TOS set 0x08
           all  --  0.0.0.0/0            213.134.225.4
Quoted 5 lines

Currently in the peak hours we have about 40 Megabit traffic. Also in this peak hours we have a CPU load of about 70%. What is the main reason of this CPU load, is it the high traffic or the iptables rules on the machine. And if the iptables rules are the reaseon of the high CPU load, does TOS mangling use much CPU?

I'm not sure, but I think the high traffic is the problem. And for iptables, I thinkg changing something (TOS or DNAT/SNAT) is the most CPU intensive. Maybe you can try to rearrange the iptables rules so the most matched rules are in the beginning of your firewall script.

Maybe you can create a test setup so you can generate 40 Megabit traffic on a test bridge without iptables rules to see what the CPU does.

Stef

Signature · 8 lines
[email protected]
 "Using Linux as bandwidth manager"
     http://www.docum.org/
     #lartc @ irc.oftc.net

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
#2 lore raw
In reply to Rinse Kloek
Quoted 3 lines · Rinse Kloek
Quoted 2 lines

We use a RedHat 7.3 machine as bridge on a P3 1.8 Ghz with 2 64 bits Gigabit interfaces. On the machine we have a lot of iptables rules like

:

Quoted 6 lines
Quoted 6 lines
           all  --  213.134.225.0        0.0.0.0/0
           all  --  0.0.0.0/0            213.134.225.0
TOS    all  --  213.134.225.4        0.0.0.0/0          TOS set 0x08
           all  --  0.0.0.0/0            213.134.225.4

Currently in the peak hours we have about 40 Megabit traffic. Also in

this

Quoted 1 line
Quoted 1 line

peak hours we have a CPU load of about 70%. What is the main reason of

this

Quoted 1 line
Quoted 1 line

CPU load, is it the high traffic or the iptables rules on the machine.

And

Quoted 3 lines
Quoted 2 lines

if the iptables rules are the reaseon of the high CPU load, does TOS mangling use much CPU?

I'm not sure, but I think the high traffic is the problem. And for

iptables,

Quoted 2 lines

I thinkg changing something (TOS or DNAT/SNAT) is the most CPU intensive. Maybe you can try to rearrange the iptables rules so the most matched

rules

Quoted 3 lines

are in the beginning of your firewall script.

Maybe you can create a test setup so you can generate 40 Megabit traffic

on a

Quoted 6 lines

test bridge without iptables rules to see what the CPU does.

Stef

--

Stef,

We have about 3200 iptables rules on our bridge. I've tested today to remove 1000 of these rules. The load dropped from about 40% to 25%. So I think the iptables rule take up the most of the CPU load. Do you think this is a problem of ineffeciency of iptables or just a 'limitation' in the TCP/IP stack of linux ?

regards Rinse

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

#3 lore raw
In reply to Rinse Kloek
Quoted 7 lines

Stef,

We have about 3200 iptables rules on our bridge. I've tested today to remove 1000 of these rules. The load dropped from about 40% to 25%. So I think the iptables rule take up the most of the CPU load. Do you think this is a problem of ineffeciency of iptables or just a 'limitation' in the TCP/IP stack of linux ?

I don't think it's a limitation. I think you reached the point where you need a bigger machine :)
Maybe you can try to iptables mailing list to find more info about the performance you can expect :
http://lists.netfilter.org/mailman/listinfo/netfilter

Stef

Signature · 8 lines
[email protected]
 "Using Linux as bandwidth manager"
     http://www.docum.org/
     #lartc @ irc.oftc.net

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
#4 lore raw
In reply to Rinse Kloek
Quoted 9 lines · Stef Coene
Quoted 7 lines

Stef,

We have about 3200 iptables rules on our bridge. I've tested today to remove 1000 of these rules. The load dropped from about 40% to 25%. So I think the iptables rule take up the most of the CPU load. Do you think this is a problem of ineffeciency of iptables or just a 'limitation' in the TCP/IP stack of linux ?

I don't think it's a limitation. I think you reached the point where you need a bigger machine :)

Some topic-related observations:
AMD Athlon XP1700+ (1466), 4xRealtek8139, 5-6Mbit/s - nearly reaching the limit of machine capabalities
P4 2000, 3com905C+BROADCOM BCM5701, 40-50Mbit/s - far better behavior Same configuration on both, thousands of iptables rules, and on the p4 machine there are 200-250 concurrent pppoe sessions (none on the athlon)

Quoted 9 lines

Maybe you can try to iptables mailing list to find more info about the performance you can expect :
http://lists.netfilter.org/mailman/listinfo/netfilter

Stef

--

Quoted 8 lines

[email protected]
"Using Linux as bandwidth manager"
http://www.docum.org/
#lartc @ irc.oftc.net

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

#5 lore raw
In reply to Rinse Kloek
Quoted 4 lines · Evgeni Gechev

Some topic-related observations:
AMD Athlon XP1700+ (1466), 4xRealtek8139, 5-6Mbit/s - nearly reaching the limit of machine capabalities

Change the 4 Realtek by 4 REAL nics, as the kernel driver of the
realtek cards sais ... "... Realtek redefine the concept of low end hardware with this chipset ..."

Quoted 3 lines

P4 2000, 3com905C+BROADCOM BCM5701, 40-50Mbit/s - far better behavior Same configuration on both, thousands of iptables rules, and on the p4 machine there are 200-250 concurrent pppoe sessions (none on the athlon)

I think is not a matter of the hardware (CPU/Mem I mean), but a matter of having good
nics, good switches, and a very good planed and inplemented network struture. If you want good performance, a tunning over the kernel network related parameters would be good too.

Best regards

Signature · 5 lines
   _                                                                   _        
  // Raúl A. Betancort Santana    /> A Dream is an answer to      __   \\       
 // <[email protected]> // question that we don't know  (oo)   \\      
// Dimensión Virtual S.L.       //  how to ask.                 / \/ \  //      
\> A Linux Solution Provider   </                               `V__V' </