All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Lambert <paul@digis.net>
To: lartc@vger.kernel.org
Subject: [LARTC] MARK causes high CPU usage / using tc in conjunction with MASQ
Date: Sat, 22 May 2004 21:25:41 +0000	[thread overview]
Message-ID: <40AFC555.1010900@digis.net> (raw)

Using below configuration multiplied by 3000+ nodes to control bandwidth
causes very high kernel cpu usage (99.5%) narrowed it down to the mangle
table. Any ideas to do this more efficiently would be appreciated.

The mangle table entry (indicated by ***) is sucking all the cpu. I am
running RH7.3 kernel  2.4.18-3 and iptables 1.2.5
This setup has worked well for more than 1000 devices but as the network
has grown to 3000+ devices the CPU is not keeping up. I have thought to
use IPMARK instead of MARK. Or, to possibly use CLASSIFY. Since this is
hard to recreate in the lab I was looking for some experienced advice on
the matter.

### root ###
tc qdisc add dev eth0 root handle 1: cbq bandwidth 100Mbit avpkt 1000 cell 8

tc qdisc add dev eth1 root handle 1: cbq bandwidth 100Mbit avpkt 1000 cell 8


### Classful qdisc upload/download rate for a group of IP address ###
tc class add dev eth0 parent 1:0 classid 1:11 cbq bandwidth 100Mbit rate
100Mbit weight 54Kbit prio 8 allot 1514 cell 8 maxburst 20 av pkt 1000

tc qdisc add dev eth0 parent 1:11 tbf rate 2048Kbit buffer 10Kb/8 limit
15Kb mtu 1500

tc class add dev eth1 parent 1:0 classid 1:11 cbq bandwidth 100Mbit rate
100Mbit weight 54Kbit prio 8 allot 1514 cell 8 maxburst 20 av pkt 1000

tc qdisc add dev eth1 parent 1:11 tbf rate 2048Kbit buffer 10Kb/8 limit
15Kb mtu 1500


### A single IP address and it's own upload/download rate ###
tc class add dev eth0 parent 1:11 classid 1:2115 cbq bandwidth 100Mbit
rate 100Mbit weight 54Kbit prio 8 allot 1514 cell 8 maxburst 20 avpkt 1000

tc qdisc add dev eth0 parent 1:2115 tbf rate 2048Kbit buffer 10Kb/8
limit 15Kb mtu 1500

*** eth0 is MASQUERADE'd so I mark the packet on eth1 ***
*** I have narrowed it down to this one entry sucking all the CPU ***
iptables -t mangle -A PREROUTING -s 10.10.6.20 -i eth1 -j MARK
--set-mark 0x843

tc filter add dev eth0 parent 1:0 protocol ip prio 1 handle 2115 fw
classid 1:2115

tc class add dev eth1 parent 1:11 classid 1:2115 cbq bandwidth 100Mbit
rate 100Mbit weight 54Kbit prio 8 allot 1514 cell 8 maxburst 20 avpkt 1000

tc qdisc add dev eth1 parent 1:2115 tbf rate 2048Kbit buffer 10Kb/8
limit 15Kb mtu 1500

tc filter add dev eth1 parent 1:0 protocol ip prio 1 u32 match ip dst
10.10.6.20 flowid 1:2115






_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

             reply	other threads:[~2004-05-22 21:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-22 21:25 Paul Lambert [this message]
2004-05-23 18:07 ` [LARTC] MARK causes high CPU usage / using tc in conjunction with MASQ Andreas Klauer
2004-05-23 22:30 ` [LARTC] MARK causes high CPU usage / using tc in conjunction Ed Wildgoose
2004-05-23 23:27 ` [LARTC] MARK causes high CPU usage / using tc in conjunction with MASQ Andreas Klauer
2004-05-24  0:50 ` [LARTC] MARK causes high CPU usage / using tc in conjunction Paul Lambert
2004-05-24 21:20 ` [LARTC] MARK causes high CPU usage / using tc in conjunction with MASQ miller69
2004-05-28 15:50 ` [LARTC] MARK causes high CPU usage / using tc in conjunction Paul Lambert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=40AFC555.1010900@digis.net \
    --to=paul@digis.net \
    --cc=lartc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.